What is a Mandelbox

A Mandelbox is a box-like fractal object that shares several properties with the well known Mandelbrot set; it is a map of continuous, locally shape preserving Julia sets. 

This means the object varies at different locations, since each area uses a Julia set fractal with a unique formula.

Like the Mandelbrot set a Mandelbox is calculated by applying a formula repeatedly to every point in space. That point v is part of a Mandelbox if it does not escape to infinity. 

In fact it replaces the Mandelbrot equation z = z2 + c with:  

  v = s*ballFold(r, f*boxFold(v)) + c

where boxFold(v) means for each axis a:

  if v[a]>1          v[a] =  2-v[a]

  else if v[a]<-1 v[a] =-2-v[a]

and ballFold(r, v) means for v's magnitude m:

  if m<r         m = m/r^2

  else if m<1 m = 1/m

The standard Mandelbox uses this formula with s=2, r=0.5 and f=1.

Unlike the Mandelbrot set a Mandelbox can exist in any number of dimensions. The images on this site are of the three dimensional Mandelbox, but to better show how this formula operates is it easier to show on the 2d Mandelbox.

Rather than thinking of the above formula as operating on a single point at a time (v), we can visualise how it operates on the entire space, in this case the entire 2d plane, by showing how it deforms a grid.

In this animation you can see four stages, the box fold in both axes, the ball fold and lastly the scale or enlarge by a factor of two:


It is a multi-fractal, which means it doesn't have a single fractal dimension measure. However, as proven in the excellent analysis by Rudi Chen, for 1<|s|<2 it has box counting dimension 3 (or n for the n dimensional Mandelbox). This is because the shape contains a solid centre of radius that varies with the scale. 

The object exhibits some stretched areas (even though its julia sets never do), a 3d map like this could only be stretch free if the julia set transforms only contained translation and scale.

The julia sets are entirely built of sphere sections and planes.

Folding fractals

The mandelbox is a map of folding fractals (also called kaleidoscopic fractals). There are many ways to fold space, the Mandelbox is just one method that happens to produce nice results.

Liouville's theorem in 1850 states that the only transformations of space that preserve the shape of the object you are transforming are rotations, translations, scale, reflection and inversions. Since escape-time fractals need some points that do not escape to infinity and some points that do, it follows that the way to provide this is to fold space on top of itself and then enlarge it. Such a scheme is first considered here then in this forum post and you can see some wonderful examples of folding fractals by Knighty in this gallery and by softology in this gallery.

It is also possible to build fractals by tearing space rather than folding it e.g. in this post, but this tends to produce more discontinuous fractal shapes.

A nice generalisation of the box fold to any convex polyhedra was suggested by fractower, simply reflect all points around the closest point in the polyhedron. This could produce interesting variations.