Mathematica code:
RR[n_, m_] := (SeedRandom[n*m]; RandomReal[])
L[t_, Q, g_, i_] := Sum[ Exp[-(t - (RR[i, 5*Q] + j))^2/g], {j, {-1, 0, 1}}]
G[c_, F_, P_, s_, o_, g_, A_, a_, w_, t_, r_, Q_, pr_, is_] :=
Graphics[
Table[
Table[
{RGBColor[RR[i, Q], RR[i, 2*Q], RR[i, 3*Q], o + A*L[t, 5*Q, g, i]],
Disk[
RotationTransform[(k + (-1)^(i*w)*t*a)*2 Pi/F]
[{r*RR[2 i, 4*Q], r*RR[2 i + 1, 4*Q]}], s*L[t, 5*Q, g, i]]},
{k, 0, F - 1, 1}],
{i, 1, P, 1}],
PlotRange -> pr, ImageSize -> is, Background -> If[c == 0, White, Black]]
Table[
ListAnimate[
Table[
G[1, 8, 30, .12, 0, .1, .25, 1, 1, t, .5, Q, .5, 500]
{t, 0, 15/16, 1/16}],
AnimationRunning -> False],
{Q, {33, 34}}]