Mandelbrot Screensaver
The Mandelbrot screensaver is a free, in-browser animation that slowly zooms forever into the Mandelbrot set, a famous fractal defined by a simple complex-number formula. Each pixel is colored by how fast it escapes to infinity, revealing infinitely fine swirling detail as the view dives deeper. It runs instantly with no download or sign-up. Press ESC at any time to exit.
How the Mandelbrot screensaver works
The Mandelbrot set is the collection of complex numbers c for which the iteration z → z² + c, starting at z = 0, never runs away to infinity. This screensaver maps every pixel on screen to one value of c and runs that loop. The core of the saver does exactly that with the real and imaginary parts split out: it repeatedly computes zi = 2·zr·zi + ci and zr = zr² − zi² + cr.
For each pixel the loop keeps iterating until the point escapes a radius-2 circle (when zr² + zi² passes 4) or until it reaches the iteration cap set by the Detail (iterations) control, which ranges from 50 to 400. Points that never escape are painted black — those are inside the set. Points that escape are colored by how many steps they survived, which is what produces the glowing bands around the black body.
With Smooth shading on, the raw escape count is refined using the final magnitude of z and a logarithm, giving a continuous fractional value instead of hard color rings. That smoothed number is mapped through a color lookup table built from the chosen Palette — Psychedelic uses a full HSL rainbow, while Fire, Ice and Mono use hand-tuned gradients.
To create the endless dive, the saver picks one of five hand-chosen coordinates deep in the set's boundary and increases zoom exponentially over about 20 seconds, with Zoom speed scaling how fast. It computes the fractal on a small off-screen buffer and stretches it to full screen for speed, then jumps to a fresh point and begins again.
A worked example
With the defaults — Palette: Psychedelic, Detail: 160 iterations, Zoom speed: 4 and Smooth shading: on — the saver locks onto a boundary point such as (−0.7436, 0.1318) and zooms in exponentially. Each frame, every pixel runs the z → z² + c loop up to 160 times; pixels still bounded after 160 steps render black, and the rest are tinted by their smoothed escape value across a rainbow lookup table. After roughly 20 seconds it cuts to a new seed point and the dive restarts.
Settings & tips
- Push Detail (iterations) toward 400 for crisper filaments in the deep zoom, or drop it near 50 for a softer, faster-rendering look on slower machines.
- Try the Fire or Ice palette instead of Psychedelic for a calmer two-tone dive, and lower Zoom speed to 1 or 2 for a more meditative pace.
- Turn off Smooth shading if you prefer crisp concentric color rings instead of continuous gradient bands.
Frequently asked questions
- Is the Mandelbrot screensaver free?
- Yes. It is completely free and runs in your browser with no download, install or sign-up. Just open the page and the endless zoom begins.
- What is the Mandelbrot set?
- The Mandelbrot set is the set of complex numbers c for which the formula z = z squared plus c never escapes to infinity. Coloring points by how quickly they escape produces the famous fractal shape.
- How do I exit the Mandelbrot screensaver?
- Press the ESC key to exit at any time. You can also move the mouse or press any key to return to the controls.
- Why does the zoom restart instead of going forever?
- Browser math uses limited floating-point precision, so detail eventually breaks down. To stay sharp, the saver zooms for about 20 seconds, then jumps to a new interesting point and begins a fresh dive.
- Can I change the colors of the Mandelbrot zoom?
- Yes. The Palette control offers Psychedelic, Fire, Ice and Mono, and you can raise the Detail setting for finer structure or toggle Smooth shading for continuous gradients.