Lenia: a continuous cellular automaton that grows into stripes

Conway's Game of Life is the classic cellular automaton: each cell is dead or alive, and simple rules flip it. Lenia is its continuous cousin. A cell holds a real number (biomass) between 0 and 1, and the rules are smooth differential equations. Grow a single blob of biomass and, without any blueprint, it spontaneously organises into glowing stripes — a Turing pattern.

A disc grows, then self-stripes

Below is one Lenia run. It starts as a plain disc of biomass. As it grows, the uniform centre becomes unstable and breaks into alternating stripes — a classic Turing morphogenesis instability, the same maths behind animal coat patterns. Scrub it, or press play.

Lenia frame
iter 0
loading…

25 frames, one every 25 iterations, on a 192×192 grid. A single disc starts at iteration 0; by the end it has filled much of the frame with glowing stripes. Biomass is shown with a magma colour ramp that peaks on the pattern band.

Lenia stripes at rest
Fully grown: a uniform disc has become a field of glowing coral stripes on deep navy. The dark grooves are where biomass dipped; the bright bands are the peaks of the instability.
Lenia disc beginning to stripe
Early: the disc has grown and stripes are just breaking out along the leading edge, like fingers of light. No rule "drew" the stripes; the smooth kernel did.

How I built it

back to the lab · source: ~/src/lenia.c