Take a complex number c, start from z = 0 and apply the rule z ← z² + c again and again. One of two things happens: the sequence stays bounded forever, or it shoots off to infinity. The Mandelbrot set is every c for which it stays bounded. Each pixel is one value of c: the horizontal axis is its real part and the vertical axis its imaginary part.
Once |z| exceeds 2 the sequence is guaranteed to escape, so a computer can stop as soon as that happens. Points still bounded after max iterations are treated as members and drawn black. Everything else is coloured by how quickly it escaped. The colourful regions are outside the set, and the black shape is the set itself.
The set is connected, and its boundary is endlessly intricate (it has Hausdorff dimension 2). Zoom in and you keep finding new spirals, "seahorses", "elephants" and complete miniature copies of the whole set ("minibrots"), which are never quite identical to the original.
A Julia set uses the same rule, but swaps the roles: c is held fixed and the pixel becomes the starting value z0. Every c therefore has its own Julia set.
The Mandelbrot set is a map of all of them. If c lies inside the Mandelbrot set, its Julia set is one connected piece. If c lies outside, the Julia set shatters into disconnected "dust". The most interesting Julia sets come from c near the boundary, and there they look strikingly like the Mandelbrot set around c. Hover over the parameter plane to watch this in the preview, then right-click or press J to open the full Julia set.
Each family changes how z is transformed before c is added. The power d generalises the square; non-integer powers use the principal branch of zd.
Colouring by the raw escape count n produces visible bands, because n is an integer. The explorer uses the normalised iteration count instead:
μ = n + 1 − log(log|z|) / log d
This varies continuously from pixel to pixel. Iteration stops at a large radius of 256 rather than 2, which makes the correction term accurate. μ is then mapped onto a palette:
Each pixel can take thousands of iterations, so a full-HD frame can require billions of complex multiply-adds. Plain Python would take minutes. These techniques bring it down to tens of milliseconds:
fractals.py
colouring.py
fastmath
cache=True
prange
atan2
exp
log
GET /api/render?cx=…&step=…
createImageBitmap
The server is stateless: the request URL fully describes the image. Most of the responsiveness comes from the browser side:
AbortController
Coordinates are 64-bit floats, which carry about 16 significant digits. Once neighbouring pixels differ by less than one part in about 1016 of their coordinate, they become indistinguishable and the image breaks into blocks. That typically happens around ×1013 zoom, and the status bar warns you when you get there. Going deeper would need perturbation theory: compute one reference orbit in arbitrary precision, then track each pixel's small difference from it in ordinary floats. That is how deep-zoom renderers reach ×101000 and beyond.