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.
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:
- Start at z₀ = the pixel.
- Repeat z → z² + c until |z| > 2, at most 300 times.
- 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 0 | c is | Julia set |
|---|---|---|
| stays bounded | in the Mandelbrot set M | connected: one piece |
| escapes | outside M | Cantor 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.)
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:
| c | name | orbit of 0 settles on | shape |
|---|---|---|---|
| 0 | circle | the fixed point 0 | the unit disc; J is the circle |z| = 1 |
| −1 | basilica | the 2-cycle 0 → −1 → 0 | bulbs pinched in pairs |
| −0.123 + 0.745i | Douady rabbit | a 3-cycle | three 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.