A fractal flame looks like glowing silk or smoke in a spotlight, yet nobody draws it. A point hops millions of times between a few transformations of the plane, and the picture maps where it lands most often: bright ropes are its haunts, translucent veils its rare stops.
How it works
A flame’s “Genome” is a handful of transforms. Each applies an affine map (rotate, squash, shift), then a weighted blend of non-linear “variations”: sinusoidal, spherical, swirl, horseshoe, julia and others, 28 in all here. Then comes the chaos game: the point picks a transform at random, by weight, jumps and marks its pixel. Each step its colour coordinate moves halfway to the transform’s colour, so the colour remembers the route.
On the GPU 262,144 particles play at once, over a million on export. Each stays invisible for its first 14 steps while it falls onto the attractor. “Quality” is the number of marks per pixel: at 60, a 1920×1080 frame gathers 124 million points. Neighbouring spots differ in hits a thousandfold, so brightness follows a logarithm: “Exposure” sets k, “Gamma” lifts the faint veils, and “Vibrancy” decides whether dense spots stay coloured or burn to white. Sparse pixels are smoothed over a disc that shrinks as hits pile up.
“Symmetry” adds rotations by 360°/n, together as heavy as all other transforms. A “random” genome grows from the seed and must pass a test, filling 20–90% of its frame with bright ropes over a haze; up to 60 candidates are tried.
A bit of history
In 1981 John Hutchinson proved that any set of contracting maps has exactly one shape made up of its own images under them. In Fractals Everywhere (1988) Michael Barnsley drew such shapes with the chaos game; his fern takes 28 numbers, four maps of six coefficients plus four probabilities. In 1992 Scott Draves bent the maps with non-linear variations, and fractal flames were born; log density and colour with memory became their hallmarks. In 1999 he launched Electric Sheep (a nod to Philip K. Dick), a distributed screensaver: volunteers’ computers render flame animations together, viewers vote, and popular “sheep” mate and mutate. Draves and Erik Reckase detailed the algorithm in 2003.
What to tweak
- “Genome” “Barnsley fern” is a pure affine system; “Symmetry” 3–5 fans the ferns out into a wheel.
- “Vibrancy” 0 with “Exposure” 4–6 burns out the core like an overexposed photo; “Gamma” 4–5 reveals the palest veils instead.
- “Colour spread” 0 gives a single-hue flame, 2 sharp contrasts between transforms.
- In animation, “Speed” turns the first transform and the flame shimmers. Add a “Kaleidoscope” with “Order” 6 on top for a living mandala.