← 📐 Mathematics

🔬 Fractal Explorer

Mode
Colour palette
Julia parameter c
Presets
Zoom targets
Re: −0.5000 Im: 0.0000 Zoom: 1×
Drag — pan · Scroll — zoom · Double-click — zoom in · R — reset

About this simulation

This explorer renders the Mandelbrot set and Julia sets in real time using a WebGL 2 fragment shader. Each screen pixel is mapped to a point on the complex plane and run through the iteration z = z² + c. The shader counts how quickly the value escapes beyond a radius and converts that escape rate into colour, using a smooth-iteration formula to avoid banding. Because the boundary holds infinite detail, you can pan and zoom continuously and keep uncovering new self-similar structure.

🔬 What it shows

The escape-time visualisation of two classic fractals from the same rule z = z² + c. For the Mandelbrot set z starts at 0 and c is the pixel coordinate; for a Julia set c is held fixed while z starts at the pixel. A point is treated as escaped once x² + y² exceeds 256, and a smooth log-log iteration count drives the colour.

🎮 How to use

Pick Mandelbrot or Julia from the Mode menu and choose a palette (Cosmic, Fire, Ocean, Neon or Greyscale). The Iterations slider runs from 64 to 1024 to control boundary detail. In Julia mode drag Re(c) and Im(c) or tap presets like Spiral, Rabbit or Dragon. Drag to pan, scroll or double-click to zoom, use the Zoom targets for Mandelbrot landmarks, and press R or Reset view to recentre.

💡 Did you know?

The boundary of the Mandelbrot set has a fractal (Hausdorff) dimension of exactly 2, so it is crinkled enough to nearly fill an area, yet the set itself encloses a finite area of roughly 1.5065 square units.

Frequently asked questions

What is the Mandelbrot set?

It is the set of complex numbers c for which the iteration z = z² + c, started at z = 0, stays bounded forever rather than racing off to infinity. Points inside the set are drawn black here, while points outside are coloured by how quickly they escape. The result is one of the most famous shapes in fractal geometry.

How does the simulation actually compute the image?

Every pixel is converted into a complex number on the plane and fed into the loop z = z² + c, repeated up to the chosen iteration limit (64 to 1024). A point is considered escaped once x² + y² passes 256, and the shader records a smooth iteration count using a log-log correction. That value is mapped through the selected palette to give each pixel its colour.

What is the difference between Mandelbrot and Julia mode?

Both use the same formula but seed it differently. In Mandelbrot mode the constant c is the pixel coordinate and z begins at zero. In Julia mode c is a single fixed value you set with the Re(c) and Im(c) sliders, while z starts from the pixel coordinate, so each choice of c produces a completely different Julia set.

Why does raising the iteration count sharpen the boundary?

Points near the boundary take many steps before it becomes clear whether they escape. A low iteration cap stops too early and lumps slow-escaping points in with the interior, blurring fine filaments. Increasing the limit gives those points more chances to diverge, revealing thinner tendrils and deeper detail, at the cost of more work per pixel.

Is the rendering mathematically accurate?

The iteration and escape test follow the standard escape-time algorithm faithfully, so the structure shown is genuine. The main limitation is precision: the shader uses 32-bit floating point, so at extreme zoom levels rounding errors eventually make the image pixelate. The smooth-colouring formula is a display technique and does not change which points belong to the set.

🔍 Fractal Explorer — Mandelbrot & Julia

Explore the infinite complexity of the Mandelbrot set and Julia sets, rendered with smooth-colouring GLSL shaders. Zoom in forever — new patterns emerge at every scale.

🔬 What It Demonstrates

Each pixel is tested: does the iteration z = z² + c diverge? The escape speed determines the colour. Julia sets fix c and vary the starting point.

🎮 How to Use

Click to zoom in. Pan with mouse drag. Switch between Mandelbrot and Julia modes. Morph the Julia parameter by moving the mouse.

💡 Did You Know?

The Mandelbrot set boundary has infinite length but encloses a finite area (≈1.5065). No matter how deep you zoom, you'll find miniature copies of the whole set — this is self-similarity.