/Gallery Web demo All effects ← Site

Courtyard Fountain

Water arcs from the fountain and falls back into the basin.

Astra Kinetic · every moving shape in it is evaluated by the rule, not drawn · 256×192 grid · 48-step seamless loop

Courtyard Fountain — animated pixel art loop generated in Phluxel
One painted still, one rule, 48 steps. Every frame above came out of the simulation.

The rule that makes it move

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.

Courtyard FountainPhlux
// 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 _u0=(X*_sx-128)*-1/65
LET _arc0=105-135*_u0+180*_u0*_u0
LET _m1=(_u0>0 & _u0<.93 & {ABS,Y*_sy-_arc0}<1) ? 1 : 0
LET _r1=_m1 ? 168 : _r
LET _g1=_m1 ? 210 : _g
LET _b1=_m1 ? 197 : _b
LET _q00={FRAC,_p+0.0}*.93
LET _x00=128+-65*_q00
LET _y00=105-135*_q00+180*_q00*_q00
LET _m2=((X*_sx-(_x00))*(X*_sx-(_x00))+(Y*_sy-(_y00))*(Y*_sy-(_y00))<4) ? 1 : 0
LET _r2=_m2 ? 239 : _r1
LET _g2=_m2 ? 240 : _g1
LET _b2=_m2 ? 210 : _b1
LET _q01={FRAC,_p+0.2}*.93
LET _x01=128+-65*_q01
LET _y01=105-135*_q01+180*_q01*_q01
LET _m3=((X*_sx-(_x01))*(X*_sx-(_x01))+(Y*_sy-(_y01))*(Y*_sy-(_y01))<4) ? 1 : 0
LET _r3=_m3 ? 239 : _r2
LET _g3=_m3 ? 240 : _g2
LET _b3=_m3 ? 210 : _b2
LET _q02={FRAC,_p+0.4}*.93
LET _x02=128+-65*_q02
LET _y02=105-135*_q02+180*_q02*_q02
LET _m4=((X*_sx-(_x02))*(X*_sx-(_x02))+(Y*_sy-(_y02))*(Y*_sy-(_y02))<4) ? 1 : 0
LET _r4=_m4 ? 239 : _r3
LET _g4=_m4 ? 240 : _g3
LET _b4=_m4 ? 210 : _b3
LET _q03={FRAC,_p+0.6}*.93
LET _x03=128+-65*_q03
LET _y03=105-135*_q03+180*_q03*_q03
LET _m5=((X*_sx-(_x03))*(X*_sx-(_x03))+(Y*_sy-(_y03))*(Y*_sy-(_y03))<4) ? 1 : 0
LET _r5=_m5 ? 239 : _r4
LET _g5=_m5 ? 240 : _g4
LET _b5=_m5 ? 210 : _b4
LET _q04={FRAC,_p+0.8}*.93
LET _x04=128+-65*_q04
LET _y04=105-135*_q04+180*_q04*_q04
LET _m6=((X*_sx-(_x04))*(X*_sx-(_x04))+(Y*_sy-(_y04))*(Y*_sy-(_y04))<4) ? 1 : 0
LET _r6=_m6 ? 239 : _r5
LET _g6=_m6 ? 240 : _g5
LET _b6=_m6 ? 210 : _b5
LET _u1=(X*_sx-128)*1/65
LET _arc1=105-135*_u1+180*_u1*_u1
LET _m7=(_u1>0 & _u1<.93 & {ABS,Y*_sy-_arc1}<1) ? 1 : 0
LET _r7=_m7 ? 168 : _r6
LET _g7=_m7 ? 210 : _g6
LET _b7=_m7 ? 197 : _b6
LET _q10={FRAC,_p+0.0}*.93
LET _x10=128+65*_q10
LET _y10=105-135*_q10+180*_q10*_q10
LET _m8=((X*_sx-(_x10))*(X*_sx-(_x10))+(Y*_sy-(_y10))*(Y*_sy-(_y10))<4) ? 1 : 0
LET _r8=_m8 ? 239 : _r7
LET _g8=_m8 ? 240 : _g7
LET _b8=_m8 ? 210 : _b7
LET _q11={FRAC,_p+0.2}*.93
LET _x11=128+65*_q11
LET _y11=105-135*_q11+180*_q11*_q11
LET _m9=((X*_sx-(_x11))*(X*_sx-(_x11))+(Y*_sy-(_y11))*(Y*_sy-(_y11))<4) ? 1 : 0
LET _r9=_m9 ? 239 : _r8
LET _g9=_m9 ? 240 : _g8
LET _b9=_m9 ? 210 : _b8
LET _q12={FRAC,_p+0.4}*.93
LET _x12=128+65*_q12
LET _y12=105-135*_q12+180*_q12*_q12
LET _m10=((X*_sx-(_x12))*(X*_sx-(_x12))+(Y*_sy-(_y12))*(Y*_sy-(_y12))<4) ? 1 : 0
LET _r10=_m10 ? 239 : _r9
LET _g10=_m10 ? 240 : _g9
LET _b10=_m10 ? 210 : _b9
LET _q13={FRAC,_p+0.6}*.93
LET _x13=128+65*_q13
LET _y13=105-135*_q13+180*_q13*_q13
LET _m11=((X*_sx-(_x13))*(X*_sx-(_x13))+(Y*_sy-(_y13))*(Y*_sy-(_y13))<4) ? 1 : 0
LET _r11=_m11 ? 239 : _r10
LET _g11=_m11 ? 240 : _g10
LET _b11=_m11 ? 210 : _b10
LET _q14={FRAC,_p+0.8}*.93
LET _x14=128+65*_q14
LET _y14=105-135*_q14+180*_q14*_q14
LET _m12=((X*_sx-(_x14))*(X*_sx-(_x14))+(Y*_sy-(_y14))*(Y*_sy-(_y14))<4) ? 1 : 0
LET _r12=_m12 ? 239 : _r11
LET _g12=_m12 ? 240 : _g11
LET _b12=_m12 ? 210 : _b11
LET _e0=(X*_sx-68)*(X*_sx-68)+16*(Y*_sy-137)*(Y*_sy-137)
LET _rad0=4+20*{FRAC,_p+0.0}
LET _m13=({ABS,_e0-_rad0*_rad0}<25 & Y*_sy>128 & Y*_sy<155) ? 1 : 0
LET _r13=_m13 ? 153 : _r12
LET _g13=_m13 ? 198 : _g12
LET _b13=_m13 ? 183 : _b12
LET _e1=(X*_sx-188)*(X*_sx-188)+16*(Y*_sy-137)*(Y*_sy-137)
LET _rad1=4+20*{FRAC,_p+0.5}
LET _m14=({ABS,_e1-_rad1*_rad1}<25 & Y*_sy>128 & Y*_sy<155) ? 1 : 0
LET _r14=_m14 ? 153 : _r13
LET _g14=_m14 ? 198 : _g13
LET _b14=_m14 ? 183 : _b13
A=255
R=_r14
G=_g14
B=_b14

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 ↓

Make it yourself

  1. Open Phluxel, click Browse Starters and pick Courtyard Fountain — that loads the painted scene and this rule together.
  2. Press play, then drag the _motion knob while it runs. You never have to stop and restart.
  3. Paint over the scene, or drop the rule on your own artwork — it reads whatever is underneath.
  4. Export a seamless loop as GIF, APNG, MP4, a PNG sequence, or a sprite sheet.

Try it without installing anything

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

More from Astra Kinetic

Analog RotationThe tonearm rides a turning record. Signal StudyA waveform crawls across an oscilloscope screen. Harbor RadarA radar sweep finds the same boat on every turn. Espresso RitualAn espresso machine pours while the cup steams. All 90 effectsThe complete starter gallery.