S-TIER art
Mandelbulb — ray-marching a 3D fractal from z⁸ + c
100k ft — What is this?
Mandelbulb — ray-marching a 3D fractal from z⁸ + c
50k ft — Why care?
Explains the Mandelbulb: Daniel White's spherical-coordinate trick for 3D 'multiplication', raised to power 8 by Paul Nylander, rendered by ray marching with the distance estimate d = ½·r·log r/dr. Code is ported line by line from Mandelbulber's GPL-3.0 source, with the Hamilton 'multiply triplets' history as a bonus.
10k ft — Key takeaways
• Distance estimate d = ½·r·log r / dr lets rays jump safely
• Mandelbulber2 source is a clean reference implementation
• Power-8 spherical formula: r→r⁸, θ→8θ, φ→8φ, then add c
• link: https://github.com/buddhi1980/mandelbulber2
• link: https://en.wikipedia.org/wiki/Broom_Bridge
5k ft — Tools & techniques
Mandelbulber
distance estimation, ray marching
1k ft — Deep-dive / try it
Can one line of math build an entire 3D world? This is the Mandelbulb, and it comes from z ↦ z⁸ + c.
In 2D, the Mandelbrot set repeats z ↦ z² + c: pick a point c, start at zero, square, add c, repeat. If it never escapes past |z| = 2, the point is black. Squaring a complex number squares its length and doubles its angle.
There is no such multiplication for points in 3D. William Rowan Hamilton tried for years; in an 1865 letter he remembers his sons asking every morning, "Well, Papa, can you multiply triplets?" and his answer, "No, I can only add and subtract them." Daniel White's 2007 idea was to copy the geometry in spherical coordinates, and Paul Nylander raised it to the 8th power: r ↦ r⁸, θ ↦ 8θ, φ ↦ 8φ, then add c.
To draw it, every pixel shoots a ray. The formula gives a distance …
Transcript excerpt
This one line of math builds an entire world. It runs inside Mandelbulb, an open source program that flies a camera through fractals. It all starts flat, with the Mandelbrot set. Pick a point C, start at zero, square it, add C, and repeat. If it never runs away, paint it black. And squaring hides a trick. The length gets squared, and the angle doubles. In three dimensions, numbers like that do not exist. William Hamilton spent years trying to multiply triplets. Every morning his sons asked, well Papa, can you multiply triplets? And he always answered, no, I can only add and subtract them. So Daniel White just copied the geometry, and Paul Milander pushed it further. Raise the length to the eighth power, and multiply both angles by eight. At power two, it's a lumpy blob. At power eight, it blooms, with bumps on bumps all the way down. To draw it, every pixel shoots a ray. The formula says how close the surface could be. So the ray jumps exactly that far, and asks again. This one needed thirteen jumps. One frame of this video takes eight million rays, a hundred million jumps, and three hundred million turns of that one line. And all of it comes from one line.