/Gallery Web demo All effects ← Site

Espresso Ritual

An espresso machine pours while the cup steams.

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

Espresso Ritual — 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.

Espresso RitualPhlux
// 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 _m1=(X*_sx>96 & X*_sx<102 & Y*_sy>87 & Y*_sy<116) ? 1 : 0
LET _r1=_m1 ? 165 : _r
LET _g1=_m1 ? 121 : _g
LET _b1=_m1 ? 73 : _b
LET _m2=(X*_sx>98 & X*_sx<101 & Y*_sy>88 & Y*_sy<115 & {FRAC,Y*_sy/9-_p*4}<.35) ? 1 : 0
LET _r2=_m2 ? 215 : _r1
LET _g2=_m2 ? 175 : _g1
LET _b2=_m2 ? 113 : _b1
LET _v0={FRAC,_p+0.0}
LET _sy0=121-55*_v0
LET _sx0=202+5*{SIN,_t+0.0}
LET _m3=({ABS,Y*_sy-_sy0}<6 & {ABS,X*_sx-_sx0-2*{SIN,Y*_sy*.3+_t}}<1.2 & Y*_sy<121) ? 1 : 0
LET _r3=_m3 ? 233 : _r2
LET _g3=_m3 ? 221 : _g2
LET _b3=_m3 ? 197 : _b2
LET _v1={FRAC,_p+0.3333333333333333}
LET _sy1=121-55*_v1
LET _sx1=202+5*{SIN,_t+2.1}
LET _m4=({ABS,Y*_sy-_sy1}<6 & {ABS,X*_sx-_sx1-2*{SIN,Y*_sy*.3+_t}}<1.2 & Y*_sy<121) ? 1 : 0
LET _r4=_m4 ? 233 : _r3
LET _g4=_m4 ? 221 : _g3
LET _b4=_m4 ? 197 : _b3
LET _v2={FRAC,_p+0.6666666666666666}
LET _sy2=121-55*_v2
LET _sx2=202+5*{SIN,_t+4.2}
LET _m5=({ABS,Y*_sy-_sy2}<6 & {ABS,X*_sx-_sx2-2*{SIN,Y*_sy*.3+_t}}<1.2 & Y*_sy<121) ? 1 : 0
LET _r5=_m5 ? 233 : _r4
LET _g5=_m5 ? 221 : _g4
LET _b5=_m5 ? 197 : _b4
A=255
R=_r5
G=_g5
B=_b5

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, select Browse Starters and pick Espresso Ritual — 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 GIF or an image sequence on Free; Pro also unlocks APNG, MP4 and sprite sheets. Use ping-pong or crossfade when the simulation does not return to its first frame.

Try it without installing anything

Phluxel runs in the browser as a demo, and the free desktop edition includes the drawing tools, rules, timeline and GPU engine. Its exports are watermarked and size-limited; MP4, APNG and sprite sheets require Pro.

Open the browser demo Download free (Windows) Get it on Steam

More from Astra Kinetic

Wind RibbonsLong banners bend in a steady breeze. Amber LaboratoryBubbles rise through a warm flask. Orbital AtelierA desk orrery swings its planets around the lamp. Courtyard FountainWater arcs from the fountain and falls back into the basin. All 90 effectsThe complete starter gallery.