The idea: which starts run away?

Pick a fixed complex number c. Take any start z₀ in the complex plane and apply the same rule again and again:

z₁ = z₀² + c,   z₂ = z₁² + c,   z₃ = z₂² + c,   …

The list z₀, z₁, z₂, … is the orbit of z₀. Some orbits run off to infinity, others stay bounded forever. The starts that stay bounded form the filled Julia set Kc; its edge is the Julia set Jc. The page draws Kc near-black and colours every other start by how fast it runs away.

The complex plane for c = −1 with the dashed circle |z| = 2. The orbit of z₀ = 0.2 + 0.1i stays inside and ends bouncing between 0 and −1. The orbit of z₀ = 1 + 0.3i wanders for 8 steps and leaves the circle at step 9
Same rule, two starts: one orbit stays inside |z| = 2 forever, the other leaves it at step 9 and never comes back.

Escape time, and why 2

If |z| > 2 and |z| ≥ |c|, then |z² + c| ≥ |z|² − |c| ≥ |z|(|z| − 1), and |z| − 1 > 1. So every step multiplies |z| by more than a fixed amount bigger than 1: the orbit is sure to escape. (Every c on this page has |c| ≤ 2, so the first |z| > 2 is already enough.) That gives a simple test per pixel:

  1. Start at z₀ = the pixel.
  2. Repeat z → z² + c until |z| > 2, at most 300 times.
  3. The number of steps n is the escape time and picks the colour: pale for quick, then blue, purple, then orange for the slowest. Never escaped after 300 steps: near-black.

The page smooths n a little (n + 1 − log₂(ln|z| / ln 2)) so the colour bands blend. Choose an orbit of start to watch the steps one by one (Demo: basilica, a start outside escapes: z₀ = 1 + 0.3i passes |z| = 2 at step 9).

Connected or dust: the orbit of 0

One start matters more than the others: z₀ = 0, the critical point (where the derivative 2z is 0). A theorem of Fatou and Julia says:

orbit of 0c isJulia set
stays boundedin the Mandelbrot set Mconnected: one piece
escapesoutside MCantor dust: infinitely many pieces, no inside

That is why the Mandelbrot set is a map of all Julia sets: the small map on the right of the canvas shows M in dark grey and c as a yellow dot. The Mandelbrot set page draws M itself. (Demo: c = 0.2 → 0.35: c slides along the real axis; at c = 0.25, the cusp of M, the set breaks into dust.)

Four Julia sets drawn as their edge points: c = 0 is the unit circle, c = −1 is the basilica, c = −0.123 + 0.745i is the Douady rabbit, all connected because the orbit of 0 stays bounded; c = 0.4 is a scatter of dust because the orbit of 0 escapes at step 7
The orbit of 0 decides: bounded gives one connected piece, escaping gives dust.

Careful with c = −0.8 + 0.156i, −0.4 + 0.6i and 0.285 + 0.01i: they are famous pictures, but each is just outside M (the orbit of 0 escapes at step 252, 26 and 19). Their Julia sets are dust whose pieces are so close that they look like curves; c = −0.8 + 0.156i escapes so late that the page still shows a few near-black blobs.

Inside M: attracting cycles

When the orbit of 0 settles into a cycle that pulls nearby points in (an attracting cycle), the inside of Kc is made of the basins of that cycle:

cnameorbit of 0 settles onshape
0circlethe fixed point 0the unit disc; J is the circle |z| = 1
−1basilicathe 2-cycle 0 → −1 → 0bulbs pinched in pairs
−0.123 + 0.745iDouady rabbita 3-cyclethree bulbs ("ears") meet at every pinch point

The period of the cycle is the number of bulbs that meet at a pinch point (Demo: rabbit, the orbit of 0 falls into a 3-cycle: 0 → −0.123 + 0.745i → −0.663 + 0.562i → ≈ 0).

c = i: the dendrite

For c = i the orbit of 0 is 0, i, −1 + i, −i, −1 + i, −i, …: bounded, so c is in M and J is connected. But the 2-cycle −1 + i, −i pushes points away (its multiplier is 4√2 > 1), so nothing is attracted and Kc has no inside: it is a tree of branches, a dendrite. Every pixel escapes, the slow ones near the branches.

Walking c

Play: walk c moves c once around the circle c = 0.7885·eiα, α = 0° → 360° in steps of 3° (dashed orange on the map). The circle runs just along the edge of M, so the picture keeps switching between connected shapes and dust. Inside M the shape changes smoothly with c; where c crosses the edge of M it can break apart suddenly. The speed choice makes each frame shorter; the Animation Speed slider is back when the walk ends.

How the page draws it

A 630 × 630 picture with up to 300 steps per pixel is far too much for one canvas object per pixel. The page paints the picture into an off-screen canvas and copies it in one go, as the logistic map page does for its bifurcation diagram. While c is moving it paints a picture with half the resolution each frame, and the sharp one once c stops.

What the page leaves out

Other maps (zd + c, Newton's method on polynomials, rational maps), deep zooms, colouring by distance estimates, the proofs (Fatou–Julia, Douady–Hubbard), and points c exactly on the edge of M, where 300 steps cannot tell inside from outside. See complex numbers for squaring a complex number as "square the length, double the angle", and Newton's method for another rule that is applied again and again.