Mandelbulb 3D Ray Marching

The Mandelbulb is a 3D analog of the Mandelbrot set, defined via spherical coordinate exponentiation: (r,θ,φ) → (rⁿ, nθ, nφ). Rendered via sphere-tracing: step along each ray by the distance-estimate function until the surface is hit. The fractal dimension is approximately 2.97.

Sphere tracing uses the distance estimate DE(p) = 0.5·|z|·log|z|/|dz|, where dz is computed via dual-number differentiation. This avoids explicit surface intersection — just march forward by DE at each step. Power 8 gives the classic Mandelbulb; try power 2 (smooth sphere) or 3 (triplex bulb).