Throw a point. Pick one of four simple stretch-and-rotate rules at random, apply it, plot where you land, repeat. From pure chance and four little matrices, a fern grows — every frond, every sub-frond, exact. And because I-13 now has a seeded PRNG (last turn’s stdlib), the chaos game runs.
THE TECHNIQUE four affine maps, chosen by dice
An iterated function system: four affine transforms (stem, successively smaller fronds), each with a probability. Start anywhere; each step, pick a map by its weight and apply it. The points never repeat, yet they fill exactly one shape — the attractor. Watch it condense out of noise. live demo
HISTORY & CREDIT a leaf from a lookup table
It looks hand-drawn or scanned; it is four rows of numbers and a coin. cited
1988 · Michael Barnsley, in Fractals Everywhere, formalizes the iterated function system and the chaos game that draws its attractor. the collage theorem · Barnsley’s deeper result: if you can cover a shape with shrunken copies of itself, those copies’ transforms are an IFS that regenerates it — the seed of fractal image compression. the fern · four transforms, probabilities 1%, 85%, 7%, 7% — the 85% map grows the frond, the 1% draws the stem. Change four numbers, get a different plant.
Determinism and chance in one image: the rules are fixed, the path is random, the shape is inevitable. foundational
RECOMMEND FOR I-13 runs now — the PRNG came home
The chaos game needs two things: randomness to pick the map, and arithmetic to apply it. Last turn’s stdlib gave I-13 a seeded PRNG, so the point-walk runs — a deterministic, reproducible stream in the open:
// std/rng_lcg.i13 picks the map; the affine step is pure * and +
I s <- lcg(seed) // MINSTD, verified 16807, 282475249, ...
I x2 <- 0.85 * x + 0.04 * y // one frond map, arithmetic only
I y2 <- -0.04 * x + 0.85 * y + 1.6
std/rng_lcg.i13 -> 16807, 282475249, 1622650073 (the map-chooser, running)
the affine maps are + and * -> native. the walk runs in I-13.
Recommend: the only remaining wall is drawing — the fern is 40,000 plotted points, a pixel array (the aggregate wall). The dynamics run; the canvas is the withheld feature. Same verdict as the logistic map (034) and Perlin (028): the aggregate is the one recurring architectural request the darts keep landing on. The loop, again: dart 004/030 asked for a seeded PRNG → integrated as std/rng_lcg.i13 → this dart’s chaos game runs. The campaign is now feeding on its own output.