Skip to main content

Playground · Mandelbrot

Mandelbrot explorer

One of the simplest equations in maths, z → z² + c, produces infinite detail. Click to zoom into the boundary of the Mandelbrot set — you can keep going essentially forever, and it never stops being intricate.

Click to zoom in · shift-click (or the button) to zoom out.

zoom

How it's built

For each pixel we take its position as a complex number c and iterate z → z² + c from zero. If |z| stays bounded it's in the set (drawn dark); if it escapes to infinity, we colour it by how fast it escaped — with a smooth-iteration tweak so the bands blend. "Detail" is the maximum iterations before we call a pixel bounded; deeper zooms need more. All computed pixel-by-pixel in vanilla JS.