1
$\begingroup$

I need to make the following animations on the torus :

t=ParametricPlot3D[{ (3 + Cos[v]) Sin[u], (3+ Cos[v]) Cos[u], Sin[v]-12}, {u, 0, 2 Pi}, {v, 0, 2 Pi},PlotStyle -> Opacity[.4],MeshStyle->None]

t1=ParametricPlot3D[{Cos[Sqrt[2] t](3 + Cos[t]), Sin[Sqrt[2] t] ( 3+Cos[t]),Sin[t]-12}, {t, 0, 40},PlotStyle -> {Blue,Opacity[7]}]

t2=ParametricPlot3D[{Cos[Sqrt[3] t](3 + Cos[t]), Sin[Sqrt[3] t] ( 3+Cos[t]),Sin[t]-12}, {t, 0, 30},PlotStyle -> {Red,Opacity[7]}]

First, the blue line "t1" wrapping the torus "t". Then, the red line "t2" wrapping the torus "t".

$\endgroup$

1 Answer 1

2
$\begingroup$
t1t2[tmax_] := ParametricPlot3D[{{Cos[Sqrt[2]  40 t/2/Pi] (3 + Cos[40 t/2/Pi]), 
       Sin[Sqrt[2] 40 t/2/Pi] (3 + Cos[t]), 
       Sin[40 t/2/Pi] - 12}, 
      {Cos[Sqrt[3]  30 t/2/Pi] (3 + Cos[30 t/2/Pi]),
       Sin[Sqrt[3] 30 t/2/Pi] (3 + Cos[30 t/2/Pi]), 
       Sin[30 t/2/Pi] - 12}}, 
  {t, 0, tmax}, 
  PlotStyle -> {Blue, Red}]

Manipulate[Show[t, t1t2[tmax], Boxed -> False, Axes -> False], 
 {tmax, Pi/6, 2 Pi}]

enter image description here

If you like replace Manipulate with Animate.

$\endgroup$

Your Answer

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

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