eureka
experiment 007 · complex dynamics · iteration

Mandelbrot Set

A deceptively simple rule: for each point c in the complex plane, iterate z → z² + c starting from z = 0. If the orbit escapes to infinity, c is exterior. If it remains bounded, c belongs to the set. The boundary—infinitely intricate, self-similar, everywhere chaotic—reveals the deep structure of nonlinear dynamics. Scroll to zoom. Click to centre and zoom in. Colors mark escape time: how long before |z| exceeds 2.

The iteration

For each point c = a + bi in the complex plane, iterate the map z → z² + c beginning at z₀ = 0. If the orbit stays bounded — |z| never exceeds 2 — the point c belongs to the Mandelbrot set M. If the orbit eventually escapes, c is exterior. The boundary ∂M is a connected set of infinite fractal complexity; every neighbourhood of every boundary point contains both interior and exterior points.

Escape time and smooth colouring

Exterior points are coloured by escape time: how many iterations before |z| exceeds 2. Raw integer counts produce visible bands; smooth colouring eliminates them using the fractional value

ν = i + 1 − log₂(log₂ |z_i|)

where i is the first iteration at which |z| exceeds 2 and z_i is the value at that step. The fractional part of ν interpolates continuously between integer bands, eliminating staircase artefacts. Hue cycles every 50 iterations through the full spectrum — the near-black interior never escaped; the brightest cycling colours escaped in just a handful of steps.

Structure and self-similarity

The main body is a cardioid — the set of c for which the iteration has a stable fixed point. Attached to it is an infinite hierarchy of bulbs, each corresponding to a periodic orbit of a different period. The largest bulb to the left (period-2) contains its own cardioid; period-3, -4, … bulbs are smaller still, and the pattern repeats to all scales. Near the boundary, miniature copies of the entire set — "baby Mandelbrots" — recur endlessly. Zoom deep enough into any boundary neighbourhood and you will always find more structure.

Presets and navigation

Scroll to zoom continuously. Click to centre on a point and zoom in 2.5×; each click is recorded so Undo steps back through the history. Max iterations controls boundary detail — higher values resolve finer filaments but take longer to render. The Seahorse valley (west of the main bulb) is dense with spiral filaments. The Elephant valley (east of the cardioid) shows period-doubling cascades. The Feigenbaum point at c ≈ −1.4012 is the accumulation limit of the real-axis period-doubling bifurcations — zoom in and the sequence of period-2, -4, -8, … bulbs converges at a universal ratio δ ≈ 4.669.

← back to workshop