Fractal Viewer

Twelve famous fractals you can zoom into until floating-point math gives out. Every zoom re-renders from the equation, so the detail never runs dry.

Pick a fractal, then dive in. Nothing here is a stored image: every frame is computed from the equation above the viewer, pixel by pixel, at whatever magnification you land on. Zoom in on an edge and new structure keeps appearing, because the iteration budget grows with every doubling of zoom.

Controls: scroll or pinch to zoom toward the cursor, drag to pan, double-click to zoom in (shift + double-click to zoom out). With the viewer focused, arrow keys pan, +/− zoom, and 0 resets. The URL tracks where you are, so any spot can be bookmarked or shared.

How the detail keeps coming

The top eight are escape-time fractals. Each pixel is a starting point; the formula runs on it over and over, and the color records how many steps it took for the value to fly off toward infinity. Points that never escape are painted black. Near the boundary, escape takes longer the closer you look, so the viewer adds 60 iterations per doubling of zoom. Without that, the edges would go flat black and the fractal would appear to “smooth out.”

The bottom four are self-similar sets: the whole shape is made of shrunken copies of itself. Instead of drawing them with a fixed number of levels, each pixel runs the copy maps in reverse, level after level, until the pieces get smaller than the pixel. Zoom in 1,000× and it simply walks seven more levels deep.

The one hard floor is the number format. JavaScript numbers carry about 16 significant digits, so somewhere around 1012–1013× (depending on your screen’s resolution and how far from the origin you are) neighboring pixels collapse onto the same coordinate. The viewer stops there and says so rather than showing blocks. Going deeper takes arbitrary-precision math, the approach dedicated deep-zoom renderers use.

Rendering is split across Web Workers, one per spare CPU core. Each view renders three times, at 8×, 3×, and full resolution, from the center outward, so you see the shape form while you zoom and it sharpens when you stop.