About the Mandelbrot Set Explorer
This explorer renders the Mandelbrot set, the set of complex numbers c for which the iteration z(n+1) = z(n)squared + c, starting from z = 0, stays bounded. Each pixel maps to a point c in the complex plane and is iterated in real time on the GPU using a WebGL fragment shader. Points that never escape the bailout radius are drawn black; escaping points are coloured by their escape time.
The Max iterations slider (50 to 10000, or automatic) sets how long each point is tested, revealing finer detail at deep zoom while rendering more slowly. The Colour dropdown chooses between eight cosine palettes (Fire, Ocean, Aurora, Sunset, Neon, Gold, Ice, Mono). Scroll to zoom toward the cursor, drag to pan, double-click to zoom in, or use the Reset and Zoom buttons. Escape-time methods like this underpin antenna design, image compression and procedural texturing.
Frequently Asked Questions
What is the Mandelbrot set?
It is the set of complex numbers c for which the sequence z(n+1) = z(n)squared + c, beginning at z = 0, stays bounded rather than racing off to infinity. Plotted in the complex plane it forms the famous cardioid-and-bulb shape with an infinitely intricate fractal boundary.
How does this simulation compute the image?
Every pixel on the canvas is mapped to a complex coordinate c, then iterated with z = z squared + c on the GPU. If the magnitude of z stays below the bailout radius up to the iteration limit, the pixel is drawn black; otherwise it is coloured by how many steps it took to escape. The whole frame is computed in a WebGL fragment shader, using perturbation from a high-precision reference orbit for deep zooms.
What does the Max iterations slider do?
It sets the maximum number of times each point is iterated before being declared part of the set, ranging from 50 to 10000 (or automatic, growing with zoom). Higher values resolve thin filaments and fine structure that only appear at deep zoom, but they make rendering slower because every pixel runs the loop more times.
What do the colour palettes represent?
The Fire, Ocean, Aurora, Sunset, Neon, Gold, Ice and Mono options are different cosine-based gradients applied to the escape time of each pixel. The colour itself carries no extra mathematical meaning; it simply visualises how quickly a point left the bailout region, turning the smooth escape value into a pleasing band-free gradient.
What is the key equation behind it?
The core rule is z(n+1) = z(n)squared + c, iterated from z = 0, where c is the pixel coordinate in the complex plane. To avoid colour banding the explorer uses smooth colouring, mu = n + 1 minus log2(log2 of the magnitude of z), which gives a continuous escape value instead of a stepped integer count.
Why are some regions left completely black?
Black pixels are points whose iterations never exceed the bailout radius within the iteration limit, so they are treated as belonging to the set. Because the test is capped at the Max iterations value, a few black points are really very slow escapers; raising the slider can reveal that some apparently solid black areas actually contain fine detail.
Is the rendering mathematically accurate?
The escape-time algorithm is exact in principle, but a plain single-precision GPU loop runs out of digits near 10^7 magnification. This explorer therefore uses perturbation theory: one reference orbit is computed on the CPU with 200-bit arithmetic and every pixel only iterates its small difference from it in float32, which stays accurate up to 10^24 magnification.
How deep can I zoom before detail stops appearing?
Mathematically the boundary is self-similar at every scale, so structure never truly ends. In practice this simulation is limited to 10^24 magnification by the float32 pixel offsets and the 200-bit centre. Until that point, scrolling or double-clicking keeps revealing seahorse valleys, spirals and tiny copies of the whole set.
How is the Mandelbrot set related to Julia sets?
A Julia set fixes the value of c and varies the starting point z, while the Mandelbrot set fixes z = 0 and varies c. Every point inside the Mandelbrot set corresponds to a connected Julia set, so the Mandelbrot set acts as a map or index of which Julia sets are connected versus fragmented dust.
What are real-world uses of escape-time fractals?
Beyond generative art, the escape-time idea informs fractal antenna design, where self-similar shapes pack wide frequency response into a small footprint. Related fractal mathematics appears in image and signal compression, terrain and texture generation for films and games, and in modelling natural patterns such as coastlines and clouds.