# Pandora's 3D box

25/11/2009

An amateur fractal programmer has discovered a new 3D version of the Mandelbrot set. Daniel White's new creation is based on similar mathematics as the original 2D Mandelbrot set, but its infinite intricacy extends into all three dimensions, revealing fractal worlds of amazing complexity and beauty at every level of magnification.

White's 3D version of the Mandelbrot set. Image © Daniel White.

The Mandelbrot set (top left) and details you get when repeatedly zooming in. Image courtesy Wolfgang Beyer.

The original 2D Mandelbrot set, named after Benoît Mandelbrot who discovered it in the 1970s, is arguably the most famous fractal of them all. Unlike ordinary 2D shapes, whose outlines typically become smooth when you look at them closely enough even if they look crinkly at first, the Mandelbrot set displays the same level of complexity at every scale. Zooming in on it is like going on a never-ending journey into hidden worlds. This infinite complexity, together with a certain level of self-similarity — you can find copies of the original Mandelbrot set appearing again and again on smaller and smaller scales as you zoom in — is what earns the Mandelbrot set the name fractal.

An existing 3D version of Mandelbrot set. There is fractal structure in the horizontal plane, but in the vertical plane the object is smooth.

Several ways of creating 3D versions of the Mandelbrot set already exist, either by modifying the original 2D version, for example spinning it around an axis, or by translating the underlying mathematics into higher dimensions. But in most cases the "fractal-ness" of the resulting images does not extend into all three dimensions. You will see fractal structures when you look across the object along certain directions, but along other directions what you see is disappointingly smooth. White's new Mandelbulb, however, does appear to have genuine fractal features no matter which way you look at it, so in terms of fractal-ness, it's arguably got the biggest claim yet to being a true 3D analogue of the original Mandelbrot set.

### The classical Mandelbrot set

So how did White produce his new beast? The classical two-dimensional Mandelbrot set is based on relatively simple mathematical objects: quadratic functions, like, for example,

Rather than only considering ordinary real numbers for the variable , you allow it to also take complex numbers as values, that is numbers of the form , where . The term is called the real part of the number, and the term is called the imaginary part of the number. You can add and multiply two complex numbers and as you would ordinary numbers, grouping together those terms that have as a coefficient: Any real number doubles up as a complex number whose imaginary part is equal to 0, for example Similarly, a complex number can have its real part equal to 0, for example . (You can find out more about complex numbers in our teacher package.)

It now makes sense to consider a quadratic function like

as a function of a complex variable For example, letting you get letting gives and letting gives

### Fixed points, cycles and escaping to infinity

But complex numbers also have a geometric interpretation: the number corresponds to the point on the plane with coordinates . It's this geometric interpretation that gives rise to the 2D Mandelbrot set. Here is how it is generated: Take any complex number and mark it on the plane as the point . Now look at the quadratic function

and see what happens when you let and iterate the function : in other words, you look at the sequence , , , and so on. First let's start with , giving , which was our initial example above. Here , so for the next step in the iteration you get and for the next step you get and so on: the point 0 is a fixed point of the function. Now look at , so In this case you get Applying the function again gives another iteration gives followed by So while is not a fixed point of this second quadratic function, it does not go very far: after two iterations of the function, the sequence becomes trapped in a 2-cycle, forever oscillating between and .

This is in stark contrast to what happens for , where

Here we have , , , etc. In this case the sequence of numbers does not become trapped anywhere, but moves further and further away from our initial point . To phrase this in technical language, the orbit of 0 escapes to infinity.

It turns out that no matter which complex value you choose for , one of two things happen: either the sequence of numbers you get when you iterate the function

from the initial point escapes to infinity (as in the last example), or it remains confined to a bounded region of the plane (as in the first two examples). If you colour black all the points that create bounded sequences, you get the Mandelbrot set. (You can find out more in the Plus article Unveiling the Mandelbrot set.)

So the secret of the classical two-dimensional Mandelbrot set lies in the fact that complex numbers, which can be added and multiplied, can also be visualised as points on the plane. The addition and multiplication rules mean that it makes sense to look at functions like for complex numbers and , and the geometric interpretation means that you can mark on the plane those points for which the function behaves in a particular way.

### The 3D version

A detail of White's 3D version of the Mandelbrot set. Image © Daniel White.

One way of creating a three-dimensional version of the Mandelbrot set is therefore to invent a new class of numbers, which correspond to points in three-dimensional space, rather than just the plane. Then define some meaningful way of adding and multiplying these numbers, so that it makes sense to consider functions such as . You can now play the same game as before. Take a number , corresponding to a point in three-dimensional space, and see what happens when you iterate the function , starting from the initial value , corresponding to the point . If the sequence of values you get from the iteration does not escape to infinity, your point lies in your 3D version of the Mandelbrot set.

### White and Nylander's formula for a 3D analogue of complex numbers

Consider the points and in 3D space. Define addition as follows:

The formula for raising a number representing the point to the power is where It now makes sense to consider functions of the form where and represent points in 3D space.

This is exactly what White did, using a 3D analogue of complex numbers, and tinkering around with ways of defining addition and multiplication that are akin to addition and multiplication of complex numbers. The initial results were slightly disappointing in terms of fractal detail. "I scoured everywhere to find signs of the 3D beast," says White, "but nothing turned up. Pretty 3D fractals were everywhere, but nothing quite as organic and rich as the original 2D Mandelbrot set." Eventually the mathematician Paul Nylander came to White's rescue. He suggested to adjust the "squaring part" in the formula to a higher power. Nylander and White struck gold with the power 8, that is with the formula The resulting three-dimensional Mandelbulb seems to exhibit fractal detail that would impress even the most stringent of fractal hunters.

It's now a task for mathematicians to investigate the exact fractal nature of the beast, and to see whether it is of genuine mathematical interest, rather than just a stunning visual oddity. The pretty pictures that arise in this area of mathematics conceal a variety of mathematical concepts that mathematicians are eager to explore further. Many will argue that there is no single 3D version of the Mandelbrot set. It all depends on what you want to generalise to higher dimensions — particular fractal structures, or other aspects underlying the mathematics of these dynamical systems.

Another detail of White's 3D version of the Mandelbrot set. Image © Daniel White.

Meanwhile, White's quest continues. Having to move all the way up to the eighth power to get the required intricacy is slightly unsatisfactory, and it suggests that one could do better by modifying the technique. What's more, White's Mandelbulb still contains some "smeared-out" areas that aren't quite as intricate as one might wish for. "As exquisite as the detail is in our discovery, there's good reason to believe that it isn't the real McCoy," he says. "That means the biggest secret is still under wraps, open to anyone who has the inclination, and appreciation for how cool this thing would look. For sure I'll still keep looking."

You can find out more about the 3D Mandelbulb on Daniel White's website.

### Paolo Bonzini said...

It is possible to describe this fractal also using quaternions. This is interesting in that it removes the need to define a special, non-standard exponentiation function.

See http://github.com/bonzini/mbulb/raw/master/mbulb.pdf [PDF] (thanks to the people on reddit.com and fractalforums.com for proofreading!)

### miner49er said...

What's the explanation for the fracvtal nature of the mandelbrot set? Is it an anomoly in the number system? Is it basically an error?

I have been fascinated by fractals for 20 years but never really thought about _why_ they (mandelbrot/escape-time) exist.

I wonder if discovering why they exist at all, may lead to a 'better' 3D analog?

### David Makin said...

Those interested in more about the Mandelbulb and the search for the "true 3D" Mandelbrot including an almost complete history of the last couple of years search may wish to look here http://www.fractalforums.com/

### Anonymous said...

I want this as screensaver,awesome