3D fractal
Mandelbox
Live turntable captured from Spiralyst Lab.
The Mandelbox folds space through a box and a sphere on every iteration and then scales it, stacking the folds into endless nested boxes, corridors, and balconies. It is a fractal of impossible architecture — something you want to walk through rather than just look at.
Architecture Without an Architect
The Mandelbox, discovered by Tom Lowe in 2010, is the Mandelbulb's architectural sibling. Instead of raising points to a power, each iteration folds space: first a 'box fold' reflects any coordinate that strays outside a central box back inside it, then a 'sphere fold' inverts points that fall too close to the center outward, and finally the whole thing is scaled. Iterate those folds and the space stacks into endless nested boxes, corridors, balconies and courtyards — a fractal you want to walk through, not just look at.
It feels built rather than grown: all right angles, recursion and impossible interior architecture, like an M. C. Escher print rendered as a solid. The scale factor is where it gets strange — a negative scale turns the whole structure inside-out, producing the alien, cathedral-like interiors the Mandelbox is famous for, while positive scales look comparatively tame.
Like the Mandelbulb it is an implicit surface drawn by ray-marching with a distance estimator, but the Mandelbox's estimator is exact in a way the Mandelbulb's is not, because the fold-and-scale operations are precisely length-controlled — which is why its edges can look so crisp.
Reflect any component that strays outside the box [−1, 1] back inside (equivalently: if vᵢ > 1 use 2 − vᵢ). This builds the boxy walls.
Invert points that fall inside the minimum radius (0.5) outward; points inside the fixed radius (1.0) get a milder inversion. This carves the spherical hollows.
Scale by a constant (often negative — the source of its strangeness), add the start point, repeat; render with the conformal distance estimate |v|/|dr|.
In Spiralyst Lab
Spiralyst Lab uses the canonical Mandelbox constants — minimum radius 0.5, fixed radius 1.0, default scale 2.0, with the scale slider allowing negatives down to −1.5 for the inverted variants — and the exact |v|/|dr| distance estimate. The scale parameter reshapes the whole structure dramatically; small changes flip it between open lattices and dense blocks. The camera orbits it in the gallery; pair a slow orbit with fog for genuine architectural depth.
Every parameter below is a live control — set it by hand, map it to a frequency band, or let it ride a smooth animation. These ranges are the actual in-app slider limits.
| Parameter | Range (in-app) |
|---|---|
| Scale | -1.5 – 3.0 |
| Iterations | 4 – 16 |
| Surface ε | 0.0001 – 0.01 |
| Ray steps | 32 – 256 |
Audio-reactive by default: uScale 1.5→2.5, distance 14→26. Any control can be mapped to audio or animation.
Plus the universal 3D controls every ray-marched type shares: camera (yaw, pitch, distance, FOV) and lighting (light direction, ambient, fog density, glow falloff).
Watch it in action
assets/video/fractals/16-mandelbox.mp4
Did you know: A negative scale value is where the Mandelbox earns its reputation — it turns the fractal inside-out into vast, room-within-room interiors; positive scales look almost ordinary by comparison.