The Mandelbrot Set

The Mandelbrot set is arguably the most famous object in fractal geometry. It lives in the complex plane and is defined by an astonishingly simple rule, yet it produces a boundary of infinite complexity that reveals new structure at every scale.

Definition

Pick any complex number cc. Starting from z0=0z_0 = 0, repeatedly apply the map:

zn+1=zn2+cz_{n+1} = z_n^2 + c

If the sequence z0,z1,z2,z_0, z_1, z_2, \ldots remains bounded (never diverges to infinity), then cc belongs to the Mandelbrot set. If it escapes to infinity, cc is outside the set.

That is the entire definition. The striking images come from colouring each point cc according to how quickly its orbit escapes.

The Escape-Time Algorithm

In practice we cannot iterate forever, so we choose a maximum iteration count and a bailout radius. A standard result shows that once zn>2|z_n| > 2 the orbit is guaranteed to escape. The algorithm for each pixel is:

  1. Map the pixel to a complex number cc.
  2. Iterate zz2+cz \leftarrow z^2 + c starting from z=0z = 0.
  3. If z2>4|z|^2 > 4 before the maximum iteration count, record the iteration number and stop.
  4. If we reach the maximum count without escaping, colour the pixel black -- it is (likely) in the set.

The iteration count at escape determines the colour. A smooth colouring technique interpolates between integer counts to remove the banding artefacts that appear with a raw count.

Self-Similarity and Fractal Dimension

Zooming into the boundary of the Mandelbrot set reveals miniature copies of the full set attached by thin filaments, surrounded by spirals, seahorse tails, and other elaborate structures. This self-similarity is not exact (unlike a Sierpinski triangle) but is present at every magnification. The boundary has a Hausdorff dimension of 2 -- it is so convoluted that it is as complex as an area, despite being a curve.

Connection to Julia Sets

Each point cc in the complex plane has an associated Julia set, defined by iterating the same map zz2+cz \mapsto z^2 + c but varying the starting point z0z_0 instead of cc. The Mandelbrot set acts as an index: if cc is inside the Mandelbrot set, the corresponding Julia set is a connected fractal; if cc is outside, the Julia set shatters into a Cantor-like dust.


100
Real: [-2.500000, 1.000000]   Imaginary: [-1.200000, 1.200000]

Click anywhere to zoom in (2x). Shift+click or right-click to zoom out.


Things to Try

  1. The Seahorse Valley -- Zoom into the region near Re0.75\text{Re} \approx -0.75, Im0.1\text{Im} \approx 0.1. You will find spiralling arms resembling seahorse tails, with miniature copies of the full set nested within.
  2. The Elephant Valley -- Look at Re0.28\text{Re} \approx 0.28, Im0.008\text{Im} \approx 0.008. The structures here fan out like elephant trunks.
  3. The Antenna -- Zoom into the thin spike extending leftward from the main cardioid, near Re1.77\text{Re} \approx -1.77. This region contains delicate branching filaments with tiny Mandelbrot copies at their junctions.
  4. Increase max iterations -- As you zoom deeper, structures that appeared to be in the set will reveal escape behaviour at higher iteration counts. Push the slider up to resolve fine detail.
  5. The main cardioid boundary -- Slowly zoom along the edge of the large heart-shaped region. Every point on this boundary is a gateway to a different spiral motif.

Performance note -- The computation runs on the main thread, so deep zooms at high iteration counts may briefly freeze the interface. Lowering max iterations will keep things responsive while exploring.