Character plasma
late '80sOne colour pair per 8×8 character cell, mixed with a dither pattern in fat 2:1 multicolour pixels, how a 1 MHz machine fakes a smooth gradient. Light-blue border included.
Σ sin(…) → palette
1988 to today
Add a few sine waves, push the sum through a colour palette, move the phases. The plasma is the warm-up exercise of every demo coder, and on 1990 hardware, a clever lie: often only the palette moved.
The algorithm
For every pixel, add several sine waves of the x and y coordinates (and sometimes of the distance to a moving point). Animate their phases over time, then map the sum through a smooth, cyclic colour gradient. A variant computes a static fractal ‘plasma cloud’ once and animates only the colours.
The old-hardware trick
Sines were never computed at runtime: a 256-entry sine table and integer offsets did the work. On indexed-colour screens like VGA mode 13h, rotating the 256-colour palette animates every pixel at once for the cost of rewriting 768 bytes, the image itself never changes.
for y in 0..199, x in 0..319:
v = SIN[x·a + t₁] + SIN[y·b + t₂]
+ SIN[(x+y)·c + t₃] + SIN[dist(x,y,cx,cy)·d]
index = (v + 4) · 32 // 0..255
pixel = palette[(index + t) & 255]
// palette cycling: draw once, then each frame
rotate(palette, 1)Documented milestones, with a source for each. Famous examples, not claims of who did it first.
Bret Mulvey · PC · VGA
A diamond-square ‘plasma cloud’ is generated once, then animated purely by cycling the hardware palette, distributed on CompuServe. A different idea from the per-frame sine plasma that followed.
SourceYobbo / Anthrox · Amiga OCS/ECS
‘Plasma Intro’, a BBS advert, shows the effect has moved from graphics experiment into the standard toolkit of short Amiga intros.
SourceFuture Crew · Second Reality · PC · DOS / VGA
Second Reality, winner at Assembly 1993, wraps an animated plasma around a spinning cube, no longer a full-screen background but a texture computed every frame.
SourceIñigo Quilez & Pol Jeremias · Browser · WebGL
Shader code that runs per pixel, shared in the browser. A plasma becomes a five-line fragment shader at full resolution, the ‘hello world’ of a new generation.
SourceFuture Crew · DOS source code
For Second Reality's twentieth anniversary the full source is published, so the 1993 plasma can be studied line by line instead of reconstructed from video.
SourceSalomonsson · Shadertoy · C++
A documented walk from the sum-of-sines maths to a Shadertoy shader and then into a native application, the plasma as a teaching staple.
Source7 live versions, from the oldest platform to today: 5 on the CPU, 2 on the GPU. Retro versions run at their original resolution and palette. Demos pause when off screen.
One colour pair per 8×8 character cell, mixed with a dither pattern in fat 2:1 multicolour pixels, how a 1 MHz machine fakes a smooth gradient. Light-blue border included.
No bitmap at all: the Copper co-processor rewrites a colour register every 8 pixels of every scanline. Blocky horizontally, silky vertically, in 4096 possible colours.
A diamond-square fractal computed once. Every frame only the 256-colour palette rotates, the picture never changes, yet everything flows.
Four lookups in a 256-entry sine table per pixel, one of them on the distance to a wandering point, recomputed every frame.
After Second Reality: a 64×64 plasma is recalculated every frame and texture-mapped onto a rotating cube with affine mapping and 16 shade levels.
The same sum of sines, evaluated per pixel at full resolution with a cosine colour palette instead of a table.
Noise fed into noise fed into noise: fractal Brownian motion whose coordinates are warped by more fbm. The plasma grown into marbled smoke.