How to get points on a 3D curve (to make 3D animation) in Asymptote?Exporting animation created with animate packageasypicture animationsI need help with path times command of asymptote package. How do I find the point of intersection of a line through X=a and a path p?Asymptote package generating unwanted marginsAsymptote: maintain window size while changing POV in animationHow to draw cloud shape in AsymptoteHow to make an animation with some previous slidesTransparent background in Asymptote animationTikz curve without control pointsHow to use Asymptote system() commandAsymptote out-of-memory error when plotting many pointsHow to make “empty” point in Asymptote?Make beamer-TikZ-animation fasterASymptote export animation as mp4

What should tie a collection of short-stories together?

Do I need life insurance if I can cover my own funeral costs?

How to write cleanly even if my character uses expletive language?

Most cost effective thermostat setting: consistent temperature vs. lowest temperature possible

How to change two letters closest to a string and one letter immediately after a string using notepad++

Could the Saturn V actually have launched astronauts around Venus?

What approach do we need to follow for projects without a test environment?

Min function accepting varying number of arguments in C++17

Have researchers managed to "reverse time"? If so, what does that mean for physics?

What's causing this power spike in STM32 low power mode

How do I hide Chekhov's Gun?

Can a druid choose the size of its wild shape beast?

Should we release the security issues we found in our product as CVE or we can just update those on weekly release notes?

Site Collection Administrator has left the building

What are substitutions for coconut in curry?

Why one should not leave fingerprints on bulbs and plugs?

My Graph Theory Students

How to simplify this time periods definition interface?

What is the significance behind "40 days" that often appears in the Bible?

Life insurance that covers only simultaneous/dual deaths

Fibers of the morphism from the free Heyting algebra to the free Boolean algebra

Do the common programs (for example: "ls", "cat") in Linux and BSD come from the same source code?

Why do Australian milk farmers need to protest supermarkets' milk price?

Employee lack of ownership



How to get points on a 3D curve (to make 3D animation) in Asymptote?


Exporting animation created with animate packageasypicture animationsI need help with path times command of asymptote package. How do I find the point of intersection of a line through X=a and a path p?Asymptote package generating unwanted marginsAsymptote: maintain window size while changing POV in animationHow to draw cloud shape in AsymptoteHow to make an animation with some previous slidesTransparent background in Asymptote animationTikz curve without control pointsHow to use Asymptote system() commandAsymptote out-of-memory error when plotting many pointsHow to make “empty” point in Asymptote?Make beamer-TikZ-animation fasterASymptote export animation as mp4













2















I want to make 3D animation in Asymptote: the blue small sphere moving along the 3D cyclic curve (that I named "orbit8"). I have heard that curves in Asymptote are parameterized. However, I don't know how to get positions of points along the orbit.



Could you please help me!



My MWE is as follows.



documentclassstandalone
usepackageasymptote
begindocument
beginasy
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
dot(U,5bp+.8red);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
endasy
enddocument









share|improve this question



















  • 1





    Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

    – Vinccool96
    2 days ago












  • @Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

    – Black Mild
    2 days ago






  • 1





    Something like this would be preferable

    – Vinccool96
    2 days ago











  • I have just improved my MWE as suggested.

    – Black Mild
    2 days ago















2















I want to make 3D animation in Asymptote: the blue small sphere moving along the 3D cyclic curve (that I named "orbit8"). I have heard that curves in Asymptote are parameterized. However, I don't know how to get positions of points along the orbit.



Could you please help me!



My MWE is as follows.



documentclassstandalone
usepackageasymptote
begindocument
beginasy
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
dot(U,5bp+.8red);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
endasy
enddocument









share|improve this question



















  • 1





    Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

    – Vinccool96
    2 days ago












  • @Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

    – Black Mild
    2 days ago






  • 1





    Something like this would be preferable

    – Vinccool96
    2 days ago











  • I have just improved my MWE as suggested.

    – Black Mild
    2 days ago













2












2








2








I want to make 3D animation in Asymptote: the blue small sphere moving along the 3D cyclic curve (that I named "orbit8"). I have heard that curves in Asymptote are parameterized. However, I don't know how to get positions of points along the orbit.



Could you please help me!



My MWE is as follows.



documentclassstandalone
usepackageasymptote
begindocument
beginasy
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
dot(U,5bp+.8red);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
endasy
enddocument









share|improve this question
















I want to make 3D animation in Asymptote: the blue small sphere moving along the 3D cyclic curve (that I named "orbit8"). I have heard that curves in Asymptote are parameterized. However, I don't know how to get positions of points along the orbit.



Could you please help me!



My MWE is as follows.



documentclassstandalone
usepackageasymptote
begindocument
beginasy
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
dot(U,5bp+.8red);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
endasy
enddocument






asymptote animations






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







Black Mild

















asked 2 days ago









Black MildBlack Mild

642511




642511







  • 1





    Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

    – Vinccool96
    2 days ago












  • @Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

    – Black Mild
    2 days ago






  • 1





    Something like this would be preferable

    – Vinccool96
    2 days ago











  • I have just improved my MWE as suggested.

    – Black Mild
    2 days ago












  • 1





    Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

    – Vinccool96
    2 days ago












  • @Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

    – Black Mild
    2 days ago






  • 1





    Something like this would be preferable

    – Vinccool96
    2 days ago











  • I have just improved my MWE as suggested.

    – Black Mild
    2 days ago







1




1





Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

– Vinccool96
2 days ago






Please use a MWE that contains the documentclass, all the usepackages (and libraries if you use tikz or something like that), as well as the begindocument and enddocument

– Vinccool96
2 days ago














@Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

– Black Mild
2 days ago





@Vinccool96 oh, it's usual in writing Asymptote code: just save with xxx.asy in Texmaker, then press F1 to typeset. Is that okay?

– Black Mild
2 days ago




1




1





Something like this would be preferable

– Vinccool96
2 days ago





Something like this would be preferable

– Vinccool96
2 days ago













I have just improved my MWE as suggested.

– Black Mild
2 days ago





I have just improved my MWE as suggested.

– Black Mild
2 days ago










1 Answer
1






active

oldest

votes


















2














You can use point(orbit8,t) where t is a time. I recommend this great tutorial as well as the asypictureB package by the author of the tutorial. That way you create the output with pdflatex -shell-escape <file>, where file could contain



documentclass[border=3.14mm]standalone
usepackageasypictureB
begindocument
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(point(orbit8,0.5),5bp+.8red);
endasypicture
enddocument


enter image description here



This is just for fun: creating an actual animation. This snippet creates a series of pdf files that can be converted to an animated gif as explained in this answer. Asymtote has its own facilities to produce animations, but I personally often use these methods (but this may just be me). The most important ingredient here is relpoint, which O.G. pointed out in the comments, so full credit goes to them.



documentclass[border=3.14mm]standalone
usepackagefilecontents
beginfilecontents*orbiter.asf
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
real mytime = @mytime;
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(relpoint(orbit8,mytime),5bp+.8red);
endasypicture
endfilecontents*
usepackageasypictureB
standaloneenvasypicture
usepackagepgffor
begindocument
defmyangle45
foreach mytime in 0,0.025,...,0.975

RequireAsyRecompile
inputorbiter.asf

enddocument


enter image description here






share|improve this answer

























  • thank you very much, marmot! i did not read the tutorial carefully.

    – Black Mild
    2 days ago






  • 1





    From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

    – O.G.
    13 hours ago











  • @O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

    – marmot
    8 hours ago










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "85"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479338%2fhow-to-get-points-on-a-3d-curve-to-make-3d-animation-in-asymptote%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









2














You can use point(orbit8,t) where t is a time. I recommend this great tutorial as well as the asypictureB package by the author of the tutorial. That way you create the output with pdflatex -shell-escape <file>, where file could contain



documentclass[border=3.14mm]standalone
usepackageasypictureB
begindocument
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(point(orbit8,0.5),5bp+.8red);
endasypicture
enddocument


enter image description here



This is just for fun: creating an actual animation. This snippet creates a series of pdf files that can be converted to an animated gif as explained in this answer. Asymtote has its own facilities to produce animations, but I personally often use these methods (but this may just be me). The most important ingredient here is relpoint, which O.G. pointed out in the comments, so full credit goes to them.



documentclass[border=3.14mm]standalone
usepackagefilecontents
beginfilecontents*orbiter.asf
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
real mytime = @mytime;
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(relpoint(orbit8,mytime),5bp+.8red);
endasypicture
endfilecontents*
usepackageasypictureB
standaloneenvasypicture
usepackagepgffor
begindocument
defmyangle45
foreach mytime in 0,0.025,...,0.975

RequireAsyRecompile
inputorbiter.asf

enddocument


enter image description here






share|improve this answer

























  • thank you very much, marmot! i did not read the tutorial carefully.

    – Black Mild
    2 days ago






  • 1





    From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

    – O.G.
    13 hours ago











  • @O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

    – marmot
    8 hours ago















2














You can use point(orbit8,t) where t is a time. I recommend this great tutorial as well as the asypictureB package by the author of the tutorial. That way you create the output with pdflatex -shell-escape <file>, where file could contain



documentclass[border=3.14mm]standalone
usepackageasypictureB
begindocument
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(point(orbit8,0.5),5bp+.8red);
endasypicture
enddocument


enter image description here



This is just for fun: creating an actual animation. This snippet creates a series of pdf files that can be converted to an animated gif as explained in this answer. Asymtote has its own facilities to produce animations, but I personally often use these methods (but this may just be me). The most important ingredient here is relpoint, which O.G. pointed out in the comments, so full credit goes to them.



documentclass[border=3.14mm]standalone
usepackagefilecontents
beginfilecontents*orbiter.asf
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
real mytime = @mytime;
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(relpoint(orbit8,mytime),5bp+.8red);
endasypicture
endfilecontents*
usepackageasypictureB
standaloneenvasypicture
usepackagepgffor
begindocument
defmyangle45
foreach mytime in 0,0.025,...,0.975

RequireAsyRecompile
inputorbiter.asf

enddocument


enter image description here






share|improve this answer

























  • thank you very much, marmot! i did not read the tutorial carefully.

    – Black Mild
    2 days ago






  • 1





    From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

    – O.G.
    13 hours ago











  • @O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

    – marmot
    8 hours ago













2












2








2







You can use point(orbit8,t) where t is a time. I recommend this great tutorial as well as the asypictureB package by the author of the tutorial. That way you create the output with pdflatex -shell-escape <file>, where file could contain



documentclass[border=3.14mm]standalone
usepackageasypictureB
begindocument
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(point(orbit8,0.5),5bp+.8red);
endasypicture
enddocument


enter image description here



This is just for fun: creating an actual animation. This snippet creates a series of pdf files that can be converted to an animated gif as explained in this answer. Asymtote has its own facilities to produce animations, but I personally often use these methods (but this may just be me). The most important ingredient here is relpoint, which O.G. pointed out in the comments, so full credit goes to them.



documentclass[border=3.14mm]standalone
usepackagefilecontents
beginfilecontents*orbiter.asf
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
real mytime = @mytime;
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(relpoint(orbit8,mytime),5bp+.8red);
endasypicture
endfilecontents*
usepackageasypictureB
standaloneenvasypicture
usepackagepgffor
begindocument
defmyangle45
foreach mytime in 0,0.025,...,0.975

RequireAsyRecompile
inputorbiter.asf

enddocument


enter image description here






share|improve this answer















You can use point(orbit8,t) where t is a time. I recommend this great tutorial as well as the asypictureB package by the author of the tutorial. That way you create the output with pdflatex -shell-escape <file>, where file could contain



documentclass[border=3.14mm]standalone
usepackageasypictureB
begindocument
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(point(orbit8,0.5),5bp+.8red);
endasypicture
enddocument


enter image description here



This is just for fun: creating an actual animation. This snippet creates a series of pdf files that can be converted to an animated gif as explained in this answer. Asymtote has its own facilities to produce animations, but I personally often use these methods (but this may just be me). The most important ingredient here is relpoint, which O.G. pointed out in the comments, so full credit goes to them.



documentclass[border=3.14mm]standalone
usepackagefilecontents
beginfilecontents*orbiter.asf
beginasypicturename=asyani
import three;
currentprojection=obliqueX;
unitsize(1cm);
real mytime = @mytime;
draw(O--4 * X,Arrow3);
draw(O--4 * Y,Arrow3);
draw(-1*Z--4 * Z,Arrow3);
label("$x$", 4 * X, NW);
label("$y$", 4 * Y, SE);
label("$z$", 4 * Z, E);
real a=.4;
triple U=(-a,-a,1),L=(a,a,1);
path3 orbit8=
(0,1,2)..(0,2,1)..(0,1,0)..U..(1,0,2)..(2,0,1)..(1,0,0)..L..cycle;
draw(orbit8,1bp+black);
dot(L,8bp+.8blue);
draw((0,0,2)--(0,0,4),6bp+green,Arrow3());
dot(relpoint(orbit8,mytime),5bp+.8red);
endasypicture
endfilecontents*
usepackageasypictureB
standaloneenvasypicture
usepackagepgffor
begindocument
defmyangle45
foreach mytime in 0,0.025,...,0.975

RequireAsyRecompile
inputorbiter.asf

enddocument


enter image description here







share|improve this answer














share|improve this answer



share|improve this answer








edited 8 hours ago

























answered 2 days ago









marmotmarmot

108k5133251




108k5133251












  • thank you very much, marmot! i did not read the tutorial carefully.

    – Black Mild
    2 days ago






  • 1





    From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

    – O.G.
    13 hours ago











  • @O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

    – marmot
    8 hours ago

















  • thank you very much, marmot! i did not read the tutorial carefully.

    – Black Mild
    2 days ago






  • 1





    From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

    – O.G.
    13 hours ago











  • @O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

    – marmot
    8 hours ago
















thank you very much, marmot! i did not read the tutorial carefully.

– Black Mild
2 days ago





thank you very much, marmot! i did not read the tutorial carefully.

– Black Mild
2 days ago




1




1





From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

– O.G.
13 hours ago





From the documentation to access points at a given percentage relpoint(path p, real l) returns the point on path p at the relative fraction l of its arclength.

– O.G.
13 hours ago













@O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

– marmot
8 hours ago





@O.G. Thanks! Could you perhaps also add this information to tex.stackexchange.com/a/392518/121799 ?

– marmot
8 hours ago

















draft saved

draft discarded
















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f479338%2fhow-to-get-points-on-a-3d-curve-to-make-3d-animation-in-asymptote%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

acmart: Multiple authors: all with same affiliation, one author an additional affiliationHow to Write Names of Multiple Authors with Shared Affiliation in ACM 2017 Template?Multiple authors with different primary affiliation, but same additional affiliationSame affiliation for all authors without extra packagesIOS-Book-Article.cls: one author with multiple affiliationacmart: Shared Author AffiliationMultiple authors with different primary affiliation, but same additional affiliationAuthor affiliation with only 1 authorAdding Multiple Authors with Different Affiliation in LaTeX ArticleLaTeX: Multiple authors stays on same lineHow to Label Multiple Authors with Same DescriptionHow to make two authors use the same affiliationTwo authors with same affiliation on finished front page

How to write “ä” and other umlauts and accented letters in bibliography?Accents in BibTeXSorting references with special characters alphabeticallyUse ae ligature in bibliographyEastern European nameInverted circumflex in BibTexBibTex, non-ascii initials and nameptr fproblems with accent in LatexHow to add a Ø to my bibliography from Jabref?References without accentsTroubles when trying to cite St“omer-Verlet in ”title" field of a bib entryComprehensive list of accented charactersHow to type the letter “i” with two dots (diaeresis) in math mode?Problem with glossary text and accented lettersSpecial character in bibliographyAccented letters, Unicode and LaTeX accentsHow to stop natbib from modifying bibliography styleCitation of a paper with non-standard characters by BibtexWrite accented characters to file using writeHow to group the bibliography alphabetically, if some surnames start with “accented” characters?How can I automatically capitalize significant words in my bibliography?

How to remove border form elements in the last row?Targeting flex items on the last rowHow to vertically wrap content with flexbox?Remove border from IFrameCSS3's border-radius property and border-collapse:collapse don't mix. How can I use border-radius to create a collapsed table with rounded corners?Div width 100% minus fixed amount of pixelsBorder around specific rows in a table?How to remove border (outline) around text/input boxes? (Chrome)How do I remove the space between inline-block elements?Flex-box: Align last row to gridRemove blue border from css custom-styled button in ChromeFill remaining vertical space with CSS using display:flexhow style elements in the last row of flexbox row layout with pure css without js