Chaos Game Fractals
Pick a random vertex of a polygon, jump partway there, repeat. With the right parameters and restriction rules, unexpected fractals emerge from pure randomness. The classic Sierpinski triangle is just the beginning — change the polygon, the jump ratio, or add rules about which vertex you can choose next, and entirely new structures appear.
Presets
How it works
The chaos game starts with a random point in the plane. At each step, you pick one of the polygon’s vertices at random and jump a fraction of the way from your current position toward that vertex. Repeating this process thousands of times produces a scatter plot that, surprisingly, often reveals fractal structure.
The Sierpinski triangle
The classic case: a triangle with jump ratio 0.5. The attractor is the Sierpinski gasket — a fractal of Hausdorff dimension log(3)/log(2) ≈ 1.585. The game works because the three contracting maps (each shrinking toward a vertex by factor 1/2) form an Iterated Function System whose fixed-point attractor is the gasket.
Restriction rules
Adding constraints on which vertex you can choose next changes the attractor entirely. Forbidding the same vertex twice in a row on a square produces a fractal that looks nothing like unrestricted square chaos. Forbidding the neighbor of the last-chosen vertex on a pentagon produces stunning rosette patterns. These restrictions change the combinatorial structure of allowed sequences, creating new fractals with no classical name.
Why do fractals appear?
Each vertex defines a contraction mapping x → r·x + (1-r)·v.
The chaos game randomly composes these contractions. By the theory of Iterated Function Systems,
the orbit converges to the unique compact set that is invariant under the union of all maps — the fractal attractor.
Restriction rules prune certain compositions, carving finer structure from the attractor.