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.
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.
| # | a | b | c | d | e | f | p |
|---|---|---|---|---|---|---|---|
| 1 | 0.000 | 0.000 | 0.000 | 0.160 | 0.000 | 0.000 | 0.010 |
| 2 | 0.850 | 0.040 | -0.040 | 0.850 | 0.000 | 1.600 | 0.850 |
| 3 | 0.200 | -0.260 | 0.230 | 0.220 | 0.000 | 1.600 | 0.070 |
| 4 | -0.150 | 0.280 | 0.260 | 0.240 | 0.000 | 0.440 | 0.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