The explanation
Every step is fully determined, yet the point never repeats and never wanders off, roaming for ever over a shape with fractal detail: a strange attractor. A positive Lyapunov exponent means chaos; a negative one means the orbit settles into a cycle of a few points.
01One map
These are the Clifford attractor equations (attributed to Clifford Pickover):
Since and never exceed 1, the point always stays inside the box , and cannot escape. The stage does something simple: iterate three million times, count how often each pixel is hit, and map the counts to brightness on a log scale.
02Measuring chaos: the Lyapunov exponent
Take two starting points extremely close together and iterate both. If their distance is multiplied on average by each step, is the (largest) Lyapunov exponent. The stage computes it by carrying a tangent vector along with the Jacobian matrix.
- : tiny differences grow exponentially; that is chaos, and the points spread into a picture with fractal detail.
- : differences shrink, and every point is drawn into the same cycle. At , , , it is a 3-point cycle.
- : the point circles along a closed curve, neither chaotic nor settling.
All six pictures in the gallery have above 0.
03Why there is a shape at all
Chaos does not mean the points are sprinkled at random over the box. The map stretches and folds the plane again and again: stretching pulls neighbouring points apart (the chaos), folding brings them back into a bounded region. What survives endless stretching and folding is a set with zero area but infinite layers of detail, and the points cover it with a fixed density, which is the light and shade in the picture.
The Lorenz attractor (wonder No. 3 on this site) is the same kind of object in continuous time; here time moves in discrete hops, so millions of points take only a fraction of a second.
Questions
Does the same set of numbers always give the same picture?
Yes. A single orbit is extremely sensitive to its start, but the density of landing points (the attractor’s "invariant measure") does not depend on it, so the picture is stable from any start.
How does "random picture" choose?
It draws four numbers between −2.5 and 2.5, computes the Lyapunov exponent and keeps only sets above 0.1 whose points spread out enough, drawing again otherwise. It usually takes only a few tries.
Can I print one?
Use "save share image" or export a video from the bar below. Write down the four numbers and you can redraw the same picture anywhere with the same two lines.
The syllabus side
Related curves
Sources: Paul Bourke — Clifford attractors · Lyapunov exponent — Wikipedia · Attractor — Wikipedia