Formula
Zoom
Iterations
Frame time

More information about the Mandelbulb

Mandelbulb 3D explorer

The Mandelbulb is the closest thing to a three-dimensional Mandelbrot set: a shape covered in bulbs that are covered in smaller bulbs, as far as you can zoom. Turn it with your finger, slide the power from 2 to 12 and watch it grow new lobes, or switch to the Mandelbox, a cube of rooms and arches made by folding space, and to quaternion Julia sets, slices of a four-dimensional fractal. Your graphics card draws every frame live, with soft shadows and light that turns with you. Drag on the picture to turn the fractal, scroll or pinch to move closer, and double-click a spot to fly towards it; Reset view brings the whole shape back. Rotate turns it slowly by itself. Shape picks the Mandelbulb, the Mandelbox or a quaternion Julia set. Power changes the Mandelbulb, Scale the Mandelbox and the Julia constant the Julia set; Detail sets how many times the formula is applied to every point. Soft shadows and Ambient occlusion make the picture deeper but slower; Quality trades sharpness for speed. While the view moves the picture is drawn at a lower resolution and sharpens as soon as it stops.

How it works

  1. Drag on the picture to turn the fractal, scroll or pinch to move closer, and double-click a spot to fly towards it.
  2. Choose the Mandelbulb, the Mandelbox or a quaternion Julia set, and change the power, the scale or the Julia constant.
  3. Pick colours and a background, and switch soft shadows, ambient occlusion and glow on or off; Quality trades sharpness for speed.
  4. Press Rotate to let it turn by itself or Record to film it, save a picture at any size, or open it in the editor.

A Mandelbrot set in three dimensions

The Mandelbrot set squares complex numbers, which doubles their angle and squares their size. Space has no numbers that do that, so in 2009 Daniel White and Paul Nylander did it by hand: describe a point by its distance and two angles, turn both angles n times, raise the distance to the n-th power, and add the starting point. Points whose orbit stays close belong to the Mandelbulb. At the power 8 its rings of bulbs carry smaller bulbs and spirals at every scale, the detail the Mandelbrot set is famous for.

The Mandelbox and quaternion Julia sets

Tom Lowe's Mandelbox of 2010 needs no angles: it folds every coordinate back into a box from −1 to 1, turns points near the centre inside out in a sphere, and scales the result. Positive scales build a cube of rooms and pillars, negative ones rounder, coral-like shapes. Quaternions, numbers with one real and three imaginary parts, do square properly, and q² + c with a fixed c gives a four-dimensional Julia set; the explorer shows its slice through three dimensions.

Drawn live by your graphics card

A fractal has no surface made of triangles, so every pixel sends a ray into the scene. The formula tells the ray a distance it can safely jump without passing through the shape; it jumps, asks again, and stops when it is closer than a pixel. Your graphics card does this for all pixels at once, dozens of steps each, then adds light, soft shadows and darkening in the cracks. While you turn the shape a smaller picture keeps it smooth, and it sharpens as soon as you stop.

Frequently asked questions

What is the Mandelbulb?

A three-dimensional fractal found by Daniel White and Paul Nylander in 2009. It applies the idea of the Mandelbrot set, z ↦ z² + c, to points in space: the point's two angles are turned n times and its distance from the centre is raised to the power n. The points whose orbit stays bounded form a shape covered in bulbs on bulbs. Power 8 is the classic version.

What does the power change?

The power n sets how often the angles turn, and so how many lobes the bulb has around its axis. Power 2 is lumpy with little detail, power 3 and up grow rings of bulbs, and power 8 shows the richest mix of towers, spirals and smooth patches. The slider also takes values between whole numbers, so you can watch new lobes grow.

What is the Mandelbox?

A 3D fractal found by Tom Lowe in 2010. Each step folds space back into a box from −1 to 1, turns points near the centre inside out in a sphere, multiplies by a scale and adds the starting point. Positive scales give a cube full of rooms and arches, negative scales rounder shapes like corals or space stations.

What is a quaternion Julia set?

Quaternions are four-dimensional numbers with one real and three imaginary parts, invented by William Rowan Hamilton in 1843. Iterating q ↦ q² + c with them, for a fixed c, gives a four-dimensional Julia set. The explorer shows its three-dimensional slice, so changing the four numbers of c bends and twists the shape.

Why does it need WebGL?

Every pixel needs dozens of ray steps with a dozen iterations of the formula each, millions of calculations per frame. WebGL lets the graphics card do them for all pixels at once, which makes turning the fractal live possible. If your browser has WebGL switched off, the explorer says so; turning on hardware acceleration usually fixes it.

Can I use the pictures?

Yes. Save gives a PNG at the size you choose, Record films the turning shape, and the pencil opens the picture in the PictorX photo editor with the background and the fractal on separate layers, the fractal transparent around its edge. In the editor itself the explorer is under Apps ▸ Fractals ▸ Mandelbulb 3D Explorer.

Mandelbulb 3D Explorer: how do I record a video?

Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device. Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner. The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF. You can add one of three music tracks: calm, bright or beat.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Go to Editor