Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- point[p0_, t_] :=
- RotationMatrix[-4 Pi t, {0, 0, 1}].p0 +
- RotationMatrix[-2 Pi t, {0, 0, 1}].{0, 2, 0};
- d\[Theta] = Pi/3;
- p0s = Table[u = RandomReal[{0, 2 Pi}];
- v = RandomReal[{0, Pi}]; {Sin[u] Cos[v], Sin[u] Sin[v],
- Cos[u]}, {i, 20}];
- AppendTo[p0s, {0, -1, 0}];
- p0fns = Table[point[p0, \[Tau]], {p0, p0s}];
- frame[t_] :=
- Show[
- Graphics3D[
- {
- Opacity[0.9],
- Sphere[{0, 0, 0}, 1],
- Sphere[2 {Sin[2 Pi t ], Cos[2 Pi t ], 0}, 1],
- Point[Table[p0fn /. {\[Tau] -> t}, {p0fn, p0fns[[;; -2]]}]],
- PointSize[Medium], Red, Point[p0fns[[-1]] /. {\[Tau] -> t}]
- }
- , PlotRange -> 3, Boxed -> False],
- ParametricPlot3D[Table[
- p0fn,
- {p0fn, p0fns[[;; -2]]}
- ], {\[Tau], Max[0, t - 1], Min[t, 1]},
- PlotStyle -> Directive[Thin, Blue, Opacity[0.7]]],
- ParametricPlot3D[
- p0fns[[-1]], {\[Tau], Max[0, t - 1], Min[t, 1]},
- PlotStyle -> Directive[Thick, Red]]
- , ViewPoint -> {-5, -5, 10}, ImageSize -> 300];
- Manipulate[frame[t], {t, 0.001, 1.999, 2/80.1}]
Advertisement
Add Comment
Please, Sign In to add comment