Hi Jehova,
The simple question is : when you calculate newx etc you put in an extra r factor. Why is this?
Oh right, it's for the same reason that one would calculate the radius squared in the standard 2D mandelbrot. Instead of approaching/repelling way from the centre of a circle though, it'll do the same for a sphere.
Paul Nylander printed a
neater representation of the formula, which you might find clearer:
{x,y,z}^n = r^n { cos(n*theta)cos(n*phi) , sin(n*theta)cos(n*phi) , -sin(n*phi) }
where r = sqrt(x^2+y^2+z^2), theta = atan2(y,x), phi = atan2(z,sqrt(x^2+y^2))
So that's the equivalent of the squaring part of the 2D mandelbrot formula (except of course it's for 3D, and for a higher power).
Also, to get a better idea, see my old tuturial found
here.
The main Mandelbrot formula stays the same ("a" and "point" are 3D numbers of course - X, Y and Z):
add( multiply(a,a) , point).
Now what do you mean by this? What specifically is the a? What form do these 3d numbers have?
I should have used just one a, and put 'square' instead of 'multiply' really. I was just trying to be more general to account for any 'triplex' multiplication.
Let's rewrite that:
add( square(a), point)
Okay so that corresponds to the original 2D mandelbrot. Using more standard math we can say:
a -> a^2 + point
...which of course is the same as Wikipedia's definition:
z -> z^2 + c
(I of course use 'a' instead of 'z', and 'point' instead of 'c').
Bear in mind of course that you replace the square function for higher powers if you wanted them.
Hope that clears things up a bit.
If Karl has discussed this with you before then i do not mind if he wants to email me his points. However it is not clear whether his "doubling" and your 3d multiplication are one and the same or not.
I think so yes. He made a quicker version which cuts out the time consuming trig stuff, but other than it's the same.
Garth, nice and unusual spirally renders - I'll have to play around with power -2 as well...