Manipulate[] animation
Manipulate[] animation
ClearAll["`*"];x = N@Range[10000]; y = x/235.;pts[t_] := Module[{k, e, d, c, q}, k = (4 + 3 Sin[2 y - t]) Cos[x/29.]; e = y/8. - 13.; d = Sqrt[k^2 + e^2]; c = d - t; q = 3 Sin[2 k] + 0.3/k + Sin[y/25.] k (9 + 4 Sin[9 e - 3 d + 2 t]); Transpose@{q + 30 Cos[c] + 200., 400 - (q Sin[c] + 39 d - 220.)}];
Manipulate[ With[{p = pts[t], len = 4 Pi, speed = 6, a = First[y], s = Last[y] - First[y]}, With[{w = len/2, h = Mod[speed s t/(2 Pi), s]}, Graphics[ {{White, Opacity[.75], PointSize[.002], Point[p]}, {Red, Opacity[.75], PointSize[.005], Point@Pick[ p, UnitStep[w - Abs[Mod[(y - a) - h + s/2, s] - s/2]], 1 ]}}, PlotRange -> {{70, 330}, {30, 350}}, Background -> Black, ImageSize -> 550, PlotRangePadding -> 0 ] ] ], {t, 0., 2 Pi, Appearance -> "Labeled"}, SaveDefinitions -> True]
GIF animation
GIF animation
In[]:=
delta = Pi/3;shift = 0;frame[t_] := With[ {p = pts[t], len = 4 Pi, speed = 6, a = First[y], s = Last[y] - First[y]}, With[ {w = len/2, h = Mod[speed s t/(2 Pi), s]}, Graphics[ { {White, Opacity[.75], PointSize[.002], Point[p]}, {Red, Opacity[.75], PointSize[.005], Point@Pick[ p, UnitStep[w - Abs[Mod[(y - a) - h + s/2, s] - s/2]], 1 ]} }, PlotRange -> {{70, 330}, {30, 350}}, Background -> Black, ImageSize -> 550, PlotRangePadding -> 0 ] ]];
In[]:=
frm1 = ParallelTable[ frame[t], {t, shift, 2 Pi - delta + shift, Pi/70}];
In[]:=
(* Slow-motion final segment *)frm2 = ParallelTable[ frame[t], {t, 2 Pi - delta + shift, 2 Pi + shift, Pi/300}];