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
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
add a comment |
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
1
Please use a MWE that contains thedocumentclass, all theusepackages (and libraries if you usetikzor something like that), as well as thebegindocumentandenddocument
– 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
add a comment |
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
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
asymptote animations
edited 2 days ago
Black Mild
asked 2 days ago
Black MildBlack Mild
642511
642511
1
Please use a MWE that contains thedocumentclass, all theusepackages (and libraries if you usetikzor something like that), as well as thebegindocumentandenddocument
– 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
add a comment |
1
Please use a MWE that contains thedocumentclass, all theusepackages (and libraries if you usetikzor something like that), as well as thebegindocumentandenddocument
– 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
add a comment |
1 Answer
1
active
oldest
votes
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

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

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 percentagerelpoint(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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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

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

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 percentagerelpoint(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
add a comment |
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

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

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 percentagerelpoint(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
add a comment |
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

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

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

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

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 percentagerelpoint(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
add a comment |
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 percentagerelpoint(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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
Please use a MWE that contains the
documentclass, all theusepackages (and libraries if you usetikzor something like that), as well as thebegindocumentandenddocument– 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