Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = 7;
- M = 100;
- p0s = RandomReal[{-2, 8}, {n, 2}];
- cols = Table[
- ColorData["DarkRainbow"][Norm[p0s[[i]]]/(Max[Norm /@ p0s])], {i,
- n}];
- ps = Table[
- Map[RotationTransform[5 Pi/4],
- NestList[
- Function[p, With[{x = p[[1]], y = p[[2]]}, {1 - y + Abs[x], x}]],
- p0s[[i]], M]],
- {i, n}];
- Manipulate[
- Graphics[
- Table[
- Join[{cols[[i]], PointSize[Large], Opacity[0.5]},
- With[{ps = ps[[i]][[;; m]]},
- {Point[ps], Opacity[1.0], If[M > m > 1, Arrow[ps[[-2 ;;]]], {}],
- Opacity[0.8], If[M > m > 2, Line[ps[[-Min[4, m] ;;]]], {}]}
- ]], {i, n}], PlotRange -> {{-7, 7}, {-10, 4}}
- ]
- , {m, 1, M, 1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement