demo 10 of 17

🫧metaballs

A lava lamp: soft blobs that drift, merge, and split.

Recordings

Both captures below are real iTerm2 sessions running the demo — the same binary renders at pixel resolution where the terminal speaks the kitty graphics protocol, and as ASCII cells everywhere else.

kitty graphics — metaballs-gfx

Each pixel sums an inverse-square field from every blob — below a threshold it stays transparent, just above it gets a bright rim, and the interior fills with palette-shaded goo, so overlapping blobs melt into one smooth surface floating over your terminal.

metaballs in kitty graphics mode
metaballs — kitty pixel mode
ASCII cells — metaballs

The same field as a glyph ramp running from a sparse rim to a solid core.

metaballs in ASCII cell mode
metaballs — ASCII cell mode

Controls

KeyAction
spaceadd a blob
mouse clickblob at the pointer
atoggle gravity
ccycle palette
+ / -blob count
q / Escquit

Tuning env vars use the METABALLS_* prefix — e.g. METABALLS_MAXDIM=1024 for sharper frames, METABALLS_CELLS=1 to force cell rendering even on kitty terminals. See the overview for the full tuning table.