Bubbleverse

The Lab · ZX Spectrum 48K · the "Bubble Universe" in a few lines of BASIC
t = 0.0005,776 points per frame

Machine

Knobs



  

What it computes

Two loops run i and j from 0 to n. Each step feeds the last point back in: u = sin(i+v) + sin(r·i+x), v = cos(i+v) + cos(r·i+x), then x = u + t. Because each point depends on the one before, the dots trace tangled strands instead of noise.

Why it's round

Each of u and v is a sum of two sines or cosines, so both stay between −2 and 2. Scaled by 30 and centred, every dot lands inside one orb. As t creeps up each frame, x shifts and the whole thing twists.

On a real Spectrum

A 3.5 MHz Z80 running BASIC manages a few dozen of these steps a second, so one 75 × 75 frame takes about two minutes. Tick "Real 48K speed" to watch it draw at roughly that pace.