Fractal Lab

Tool

IFS Playground

An Iterated Function System is a finite set of contractive affine maps. By Hutchinson's 1981 theorem, the system has a unique compact attractor invariant under the union of the maps. The chaos game algorithm renders that attractor by random iteration.

Chaos game: a random IFS map is applied at each step, after a short burn-in.0 ms

More points means denser detail, especially in low-probability regions of the attractor.

IFS rules for Barnsley fern

Each affine map is x′ = a x + b y + e, y′ = c x + d y + f, chosen with probability p.

#abcdefp
10.0000.0000.0000.1600.0000.0000.010
20.8500.040-0.0400.8500.0001.6000.850
30.200-0.2600.2300.2200.0001.6000.070
4-0.1500.2800.2600.2400.0000.4400.070

The chaos game

Pick a starting point. Repeatedly: choose one of the IFS maps at random (weighted by their probabilities), apply it, plot the result. After a few iterations the plotted points are essentially on the IFS attractor, regardless of where you started. Barnsley's 1988 theorem says this is true for any contractive IFS with non-zero probabilities.

FAQ

Frequently asked questions