As close as I can get to coding a 3d Mandelbulb as an affine fractal flame.  Mandelbulbs are usually calculated as escape time formulas;  Simply put, each point in 3d space is calculated to see whether it is within a boundary, if it is then it is drawn, if it escapes the boundary then those points are not drawn. 

It's different with affine transformations, for some reason the conformal representations of Complex number functions are inverted in fractal flame programs, so functions like roots show up similar to a power.  So knowing this, I was able to take the polar form equation of a Complex n root, modify it to apply to spherical coordinates rather than rectangular and get something similar.

For sake of speed, 2 random numbers are generated corresponding to a different root, allowing a random root to be calculated each point iteration.  So a power 8 mandelbulb equivalent would have 8x8 = 64 roots to randomly choose.

The benefit of an affine root bulb, is that it seems to project points to the surface of a bulb rather than volume, so no calculations are thrown out and objects can be morphed and mapped to the surface.
Fractals
Published: