# Mandelbulb using Animation nodes

Lately i've been reading a lot about fractals, mandelbrot set and the mandelbulb.

I am able to recreate the mandelbulb in Blender using a volumetric material (similar to the solutions discussed here, without using an add-on: Recreating Mandelbulbs with math nodes). But as I wasn't really satisfied with the possibilities there I tried to replicate in in Animation nodes to maybe get a particle-system-like look (I don't really know where I was going tbh).

The formulas used in pseudocode:

r = sqrt(x*x + y*y + z*z )
theta = atan2(sqrt(x*x + y*y) , z)
phi = atan2(y,x)

newx = r^n * sin(theta*n) * cos(phi*n)
newy = r^n * sin(theta*n) * sin(phi*n)
newz = r^n * cos(theta*n)


The way I understood the whole thing was, I have starting Coordinate (P1), and for every iteration I get a new Coordinate (Pn). So this is my node tree and the result (not really what I was going for):

I think my formulas are correct – I don't think I really understood the whole concept though. Is this even possible to do? Any hints?