3
$\begingroup$

How I could transform animation on this torus :

 r = 2;
pl1 = ParametricPlot3D[{Cos[v] (r + Cos[u]), Sin[v] (r + Cos[u]), 
    Sin[u]}, {v, 0, 2 Pi}, {u, 0, 2 Pi}, Mesh -> False, 
   PlotStyle -> Opacity[0.7]];

pl2 = ParametricPlot3D[
   Block[{u = 3 t, v = 4 t}, {Cos[v] (r + Cos[u]), 
     Sin[v] (r + Cos[u]), Sin[u]}], {t, 0, 2 Pi}, PlotStyle -> Thick];

Animate[Show[pl1, pl2, 
  Graphics3D[{Green, 
    Sphere[Block[{u = 3 t0, v = 4 t0}, {Cos[v] (r + Cos[u]), 
       Sin[v] (r + Cos[u]), Sin[u]}], 0.1]}]], {t0, 0, 2 Pi}]

enter image description here

To animation based not on Point moving on the Curve, but curve wounding on the Torus, like there curve moving on surface : Surface

$\endgroup$

2 Answers 2

2
$\begingroup$
Animate[Show[pl1, 
     ParametricPlot3D[Block[{u = 3 t, v = 4 t}, {Cos[v] (r + Cos[u]), 
        Sin[v] (r + Cos[u]), Sin[u]}], {t, 0, t0}, PlotStyle -> Thick], 
  Graphics3D[{Green, Sphere[Block[{u = 3 t0, v = 4 t0}, {Cos[v] (r + Cos[u]), 
       Sin[v] (r + Cos[u]), Sin[u]}], 0.1]}]], {t0, 0, 2 Pi}]
$\endgroup$
2
$\begingroup$

Change 2 Pi in the PlotRange for the line with t0

Animate[Show[pl1, 
 ParametricPlot3D[Block[{u = 3 t, v = 4 t}, {Cos[v] (r + Cos[u]), 
 Sin[v] (r + Cos[u]), Sin[u]}], {t, 0, t0}, PlotStyle -> Thick],
 Graphics3D[{Green, Sphere[Block[{u = 3 t0, v = 4 t0}, {Cos[v] (r + Cos[u]), 
 Sin[v] (r + Cos[u]), Sin[u]}], 0.1]}]], {t0, 0, 2 Pi}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.