Skip to main content
BVDART Logo
← All guidesGenerative systems

The Mandelbrot set and escape-time rendering

The Mandelbrot set contains complex parameters c for which repeated evaluation of z² + c, starting at zero, remains bounded.

Choose a complex parameter and trace its orbit from zero

Each pixel asks: does this c escape?Re: -2.200 → 1.000 · Im: 1.200 → -1.200
Follow the selected orbitz₀ = 0
zₙ₊₁ = zₙ² + c
Complex orbit from zero with escape circle|z| = 2ReIm|z| = 0.338

Escapes at step 33

Crossing the radius-2 circle proves escape. A finite run that stays inside does not prove membership.

Try this Set c = 0: every iterate stays at zero. Try c = −1 for a two-point cycle, then c = 0.5 for an escaping orbit.

Magnify the boundary around the zoom focus: every displayed pixel is recomputed in the smaller complex-plane region. Use any control to take over.

What to try
  1. Move c with the plane or the Re(c) and Im(c) controls.
  2. Scrub Orbit step n; compare c = 0, c = −1 and c = 0.5 with Im(c) = 0.
Open in the Lab ↗

What to look for: Each image pixel chooses c while z starts at zero. The orbit panel shows repeated squaring and addition; crossing radius 2 establishes escape. A finite unescaped sample remains inconclusive.

How it works

An escape-time renderer visits each image pixel as a complex parameter and iterates the recurrence. If the magnitude grows beyond an escape bound, the number of iterations can control its color. Points that have not escaped by the iteration limit receive an interior-like treatment.

Moving the center changes the sampled region of the complex plane; zoom changes its scale. Increasing the iteration limit can resolve structure near the boundary. Burning Ship and Tricorn use related but different recurrences and therefore generate different sets.

Use it in the Lab

Use the Fractals input category to generate a source, then compose or process it like any other layer. Record center, zoom, iteration limit and mapping when preserving a particular view.

Limits & distinctions

A finite iteration test cannot prove that every unescaped point belongs to the mathematical set. Zoom is also limited by numerical precision and the raster dimensions.

Further reading

The Iteration

The Mandelbrot set is defined by a deceptively simple rule: for each complex number c, iterate z = z² + c starting from z = 0. If the sequence remains bounded (|z| ≤ 2) after many iterations, c belongs to the set.

Mandelbrot Iteration

z₀ = 0 zₙ₊₁ = zₙ² + c If |zₙ| > 2 for any n, then c escapes (not in the set). The number of iterations before escape determines the color.

mandelbrot.ts
function mandelbrot(cx: number, cy: number, maxIter = 256) {
  let zx = 0, zy = 0;
  for (let i = 0; i < maxIter; i++) {
    const zx2 = zx * zx, zy2 = zy * zy;
    if (zx2 + zy2 > 4) return i; // escaped
    zy = 2 * zx * zy + cy;
    zx = zx2 - zy2 + cx;
  }
  return maxIter; // bounded — in the set
}
typescript

Coloring Methods

Escape-time coloring assigns colors based on how many iterations it takes for a point to escape. Smooth coloring interpolates between iteration bands using the final |z| value for seamless gradients. Orbit traps measure the closest approach of the orbit to a geometric shape (circle, cross, point), revealing internal structure.

Infinite Depth

Deep-zooming into boundary regions reveals an endless hierarchy of self-similar structures — miniature copies of the set, spiral galaxies of filaments, and seahorse valleys. Each zoom level reveals new complexity, mathematically proven to continue forever.

Mathematical Fact

The boundary of the Mandelbrot set has a Hausdorff dimension of exactly 2, meaning it is so complex that it effectively fills a 2D area despite being a 1D curve.

Articles

Related artworks

Related Lab categories

Sources & references

Guide updated