Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. p1 = ParametricPlot3D[{(3 + Cos[v]) Sin[u], (3 + Cos[v]) Cos[u],
  2. Sin[v]}, {u, 0, 2 Pi}, {v, 0, 2 Pi},
  3. PlotStyle -> Opacity[.5], Mesh -> None];
  4.  
  5. ClearAll[p2, p3]
  6. p2[tmax_] := ParametricPlot3D[{Cos[Sqrt[2] t] (3 + Cos[t]),
  7. Sin[Sqrt[2] t] (3 + Cos[t]), Sin[t]}, {t, 0, tmax}, PlotStyle -> Thick];
  8. p3[tmax_] := ParametricPlot3D[{Cos[Sqrt[2] t] (2 + Cos[t]),
  9. Sin[Sqrt[2] t] (2 + Cos[t]), 8 + Sin[t]}, {t, 0, tmax}] /.
  10. Line -> ({CapForm[None], FaceForm[Green, White], Tube[#, .25]} &);
  11.  
  12. Manipulate[Show[p1, p2[tmax], p3[tmax], PlotRange -> All], {tmax, 1, 50}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement