Afterglowscreensavers

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.

Live preview

Mandelbrot screensaver — Infinite, all the way down.

Press ESC to leave fullscreen. Settings are saved in your browser only.

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.

Benoit Mandelbrot and the escape-time picture

The set is named after the mathematician Benoit Mandelbrot, who first visualised it on 1 March 1980 at IBM’s Thomas J. Watson Research Center. Robert Brooks and Peter Matelski had defined and drawn it in 1978 while studying Kleinian groups. Adrien Douady and John Hubbard began its mathematical study in 1985 and named it after Mandelbrot, and a Scientific American cover in August 1985, followed by books by Heinz-Otto Peitgen and Peter Richter in 1986, brought the picture to a wide audience.

The colours do not come from the set itself. Points inside the set never escape, and are traditionally coloured black. Points outside are coloured by how quickly the iteration blows up: those that escape after a few steps are in the outer bands, and those that barely escape cluster near the boundary and show the intricate detail. This is called the escape-time method, and the palette is an arbitrary choice that can emphasise different features.

Zooming reveals that the boundary is endlessly detailed, and small, slightly different copies of the whole set appear at arbitrarily small scales. Douady and Hubbard proved that the set is connected. A caveat is that computers use finite precision, so extremely deep zooms eventually dissolve into blocky pixels unless arbitrary-precision arithmetic is used.

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

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.
Why is the boundary so intricate?
Points near the edge are the ones whose behaviour is hardest to decide, because tiny differences in c decide whether the iteration escapes. The colouring by escape time makes that sensitivity visible.
Why do deep zooms turn blocky?
Standard double-precision floating-point numbers carry only about 15 to 16 significant decimal digits, so neighbouring pixels eventually map to the same value. Deeper zooms need higher-precision arithmetic.

← All Generative screensavers