The Mandelbrot set
Every pixel is a complex number c. Start at 0 and repeat z → z² + c. If z flies off to infinity, the colour says how fast. If z has not escaped within N iterations, where N is the Detail setting, the pixel is dark. Dark means "not caught escaping yet", not "stays small forever". Click or tap anywhere to zoom in on that spot, or switch to inspecting and tap a point to see its orbit.
What's going on
A complex number c = a + bi is a point on the plane: a steps right, b steps up. For each such point we run a tiny machine. Start with z = 0, then replace z by z² + c, then do it again, and again. "Iterate" just means repeat.
Try c = −1 by hand: 0, then 0² − 1 = −1, then (−1)² − 1 = 0, then −1, then 0. It bounces between two values forever and never escapes, so −1 is in the set and painted dark. Now try c = 1: 0, 1, 2, 5, 26, 677. It explodes, so 1 is outside, and it escaped quickly, so it gets a bright colour.
The computer cannot run forever, so it stops after N steps and paints dark anything that has not yet escaped. Once |z| is bigger than 2 the orbit is certain to fly off, so a coloured pixel is settled for good. A dark pixel is only "not escaped within N": a verdict of "not yet". Press c = 0.2501 and Show orbit with N = 100: dark. Try N = 250: still dark. Try N = 500: the orbit crawls up past 0.5 and first passes 2 at iteration 312. The pixel was never in the set; the experiment simply had not run long enough.
Predict, then test. Can raising N turn a coloured pixel dark? Can it turn a dark pixel coloured? Decide, then switch Detail from 100 to 500 and watch which pixels change along the edge. Only one direction is possible.
Compare the two kinds of knowing. For c = −1 the orbit repeats 0, −1, 0, −1 exactly, and one line of algebra, (−1)² − 1 = 0, proves it never escapes; no amount of iterating was needed. For c = 0.2501 only computation told us anything, and it was wrong until N was big enough. It is the same gap as in the Collatz problem, where every number up to 2⁶⁸ has been checked and it still is not a theorem. This demo shows the limit of its own experiment: the dark region you see is an upper estimate of the set, shrinking a little every time N grows.
The boundary between staying and escaping is the astonishing part. However far you zoom, the edge keeps producing new spirals, seahorses and tiny copies of the whole set. Points a hair apart can behave completely differently, so no amount of magnification ever makes the edge look smooth.
Sheet: Imaginary numbers are real.