Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- d\[Theta] = 3;
- r[n_] := (1/d\[Theta])^n;
- p[0, t_] := {0, 0};
- p[n_, t_] :=
- p[n, t] =
- p[n - 1, t] +
- RotationMatrix[(-d\[Theta])^(n - 1) t].{0, r[n - 1] - r[n]};
- frame[\[Tau]_] :=
- Show[
- Graphics[
- {
- Table[Circle[p[n, \[Tau]], r[n]], {n, 0, 10}]
- }
- ],
- If[\[Tau] < 2 Pi,
- Table[
- ParametricPlot[p[n, t], {t, -0.01, \[Tau]},
- PlotStyle -> ColorData["RedBlueTones"][n/10]], {n, 0, 10}],
- Table[
- ParametricPlot[p[n, t], {t, \[Tau], 4 Pi + 0.01},
- PlotStyle -> ColorData["RedBlueTones"][n/10]], {n, 0, 10}]
- ], ImageSize -> 300
- ];
- Manipulate[frame[t], {t, 0, 4 Pi}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement