Scroll or pinch to zoom · drag to pan · double-click/tap to reset
An iterated function system is a handful of affine maps. Each row of a system is seven numbers a b c d e f p: it takes a point (x, y) to (a x + b y + e, c x + d y + f) and is picked with probability p. Start anywhere, pick a map at random by the probabilities, apply it, plot the point, and repeat a million times: the points pile up on the attractor, the fractal the maps describe, whatever the starting point. The 3D page does the same with thirteen numbers a row.
The systems are in one text file, fractint.ifs, in Fractint's format. They are Fractint's own (the Sierpinski triangle, the fern, the coral and the others of its fractint.ifs), the five of Anthony Hanmer's from Fractint 20's fract205.ifs, and, last in the list, one of mine (lars, my name in capital letters, made as described below). I checked every system of Fractint's against the file: the numbers are identical. The next map is chosen as Fractint chooses it: the probabilities are added up in order until the sum reaches a random number between 0 and 1, so when they add up to less than 1 the last map takes what is left, and a negative probability (the first row of DC022b6c has one) is never chosen.
Spelling a word works the other way round from most IFS fractals. make_word.py is a small Python script (standard library only) that writes the system for any word in capital letters: make_word.py LARS prints the block, --write puts it in fractint.ifs, and --render out.png draws the attractor. Every letter is drawn as a few straight strokes, bars, stems and diagonals, each a parallelogram. The attractor of an IFS is the union of the images of itself under its maps, so if the strokes of the word are to be the attractor, each map must send the whole word onto one stroke. That is what a row does here: the word's bounding box is squeezed (and for a vertical stem turned a quarter turn, for a diagonal run along the stroke) into that stroke's parallelogram, so every stroke holds a smaller copy of the whole word, which holds smaller copies in its strokes, and so on. The numbers a b c d e f come straight from where the stroke's corner and two edges land, and each probability is the stroke's share of the word's total area, so the copies fill in evenly. The strokes only touch, never overlap, which the script checks; with straight strokes only, round letters such as C, O and S come out blocky with cut corners.
The chaos game is the simplest IFS: its maps are all the same shrink toward the corners of a regular polygon, chosen with equal probability. Here each map can have its own matrix, so it can also turn, stretch and shear, and its own probability, which is what makes ferns, trees and letters possible.
This page was created with Claude Code.