A desk orrery swings its planets around the lamp.
This is the whole thing. Phluxel runs it on every cell, every step — the animation is what
happens when you repeat it. BASE is the painted scene, so the rule reads the artwork
instead of its own output and never smears.
// Astra scene. _sx/_sy rescale the 256x192 coordinates to any grid size.
PARAM _motion=1
LET _sx = 256/GW
LET _sy = 192/GH
LET _p={FRAC,TICK*_motion/48}
LET _t=_p*6.283185307179586
LET _r=BASE.R
LET _g=BASE.G
LET _b=BASE.B
LET _x0=128+73*{COS,_t+0.0}
LET _y0=86+37*{SIN,_t+0.0}
LET _m1=((X*_sx-(_x0))*(X*_sx-(_x0))+(Y*_sy-(_y0))*(Y*_sy-(_y0))<144) ? 1 : 0
LET _r1=_m1 ? 191 : _r
LET _g1=_m1 ? 99 : _g
LET _b1=_m1 ? 75 : _b
LET _m2=((X*_sx-(_x0-3))*(X*_sx-(_x0-3))+(Y*_sy-(_y0-3))*(Y*_sy-(_y0-3))<4) ? 1 : 0
LET _r2=_m2 ? 243 : _r1
LET _g2=_m2 ? 223 : _g1
LET _b2=_m2 ? 177 : _b1
LET _x1=128+48*{COS,_t+2.1}
LET _y1=86+63*{SIN,_t+2.1}
LET _m3=((X*_sx-(_x1))*(X*_sx-(_x1))+(Y*_sy-(_y1))*(Y*_sy-(_y1))<81) ? 1 : 0
LET _r3=_m3 ? 66 : _r2
LET _g3=_m3 ? 125 : _g2
LET _b3=_m3 ? 124 : _b2
LET _m4=((X*_sx-(_x1-3))*(X*_sx-(_x1-3))+(Y*_sy-(_y1-3))*(Y*_sy-(_y1-3))<4) ? 1 : 0
LET _r4=_m4 ? 243 : _r3
LET _g4=_m4 ? 223 : _g3
LET _b4=_m4 ? 177 : _b3
LET _x2=128+65*{COS,_t+4.2}
LET _y2=86+22*{SIN,_t+4.2}
LET _m5=((X*_sx-(_x2))*(X*_sx-(_x2))+(Y*_sy-(_y2))*(Y*_sy-(_y2))<49) ? 1 : 0
LET _r5=_m5 ? 210 : _r4
LET _g5=_m5 ? 162 : _g4
LET _b5=_m5 ? 71 : _b4
LET _m6=((X*_sx-(_x2-3))*(X*_sx-(_x2-3))+(Y*_sy-(_y2-3))*(Y*_sy-(_y2-3))<4) ? 1 : 0
LET _r6=_m6 ? 243 : _r5
LET _g6=_m6 ? 223 : _g5
LET _b6=_m6 ? 177 : _b5
LET _m7=((X*_sx-(128))*(X*_sx-(128))+(Y*_sy-(86))*(Y*_sy-(86))<529) ? 1 : 0
LET _r7=_m7 ? 219 : _r6
LET _g7=_m7 ? 165 : _g6
LET _b7=_m7 ? 83 : _b6
LET _m8=((X*_sx-(122))*(X*_sx-(122))+(Y*_sy-(80))*(Y*_sy-(80))<25) ? 1 : 0
LET _r8=_m8 ? 239 : _r7
LET _g8=_m8 ? 209 : _g7
LET _b8=_m8 ? 149 : _b7
A=255
R=_r8
G=_g8
B=_b8
The coordinates are written for the 256×192 canvas this was painted on;
_sx/_sy rescale them, so the same rule works on a smaller grid too.
Download the script ↓
_motion knob while it runs. You never have to stop and restart.Phluxel runs in the browser as a demo, and the free desktop edition has every feature with a watermark on exports.
Open the browser demo Download free (Windows) Wishlist on Steam