News: Support us via Flattr FLATTR Link

## The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!

 Pages: [1]   Go Down
 Author Topic: 3D Mandelbrot Formula based on Rotation Away from Azimuthal Axis  (Read 13412 times) Description: 3D Mandelbrot Formula based on Rotation Away from Azimuthal Axis 0 Members and 1 Guest are viewing this topic.
bugman
Conqueror

Posts: 122

 « on: December 09, 2009, 11:18:24 PM »

The rotational matrix form of Mandelbulb triplex power formula goes as follows:
{x, y, z}^n = Rz(n*theta)*Ry(-n*phi)*{r^n, 0, 0}
where r = sqrt(x²+y²+z²), theta = atan2(y, x), phi = asin(z/r)

This formula actually does already apply the azimuthal angle (phi) rotation away from the azimuthal axis (z-axis). However, last week I got confused and I thought that I had to sandwich the y-axis rotation between an un-rotate / re-rotate pair of transformations. Hence the following formula:
 Azimuthal Mandelbrot.jpg (165.81 KB, 610x981 - viewed 2589 times.) « Last Edit: December 12, 2009, 08:48:23 PM by bugman » Logged
kram1032
Fractal Senior

Posts: 1863

 « Reply #1 on: December 09, 2009, 11:28:55 PM »

very nice Mandelbrot
 Logged
Paolo Bonzini
Guest
 « Reply #2 on: December 10, 2009, 12:01:27 AM »

That means that the phi rotation is done around the [cos theta, sin theta,0] axis instead of the y axis, right?
 Logged
cbuchner1
Fractal Phenom

Posts: 443

 « Reply #3 on: December 10, 2009, 12:15:47 AM »

Looks like a hairybrot or furrybrot to me!
 Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #4 on: December 10, 2009, 01:22:06 AM »

It seems odd to me that the original Mandelbulb triplex power formula applies the azimuthal angle's rotation about the y-axis. Suppose instead we rotate away from the azimuthal axis. We can do this by sandwiching the y-axis rotation between an un-rotate / re-rotate pair of transformations.

Hi Paul, are the trig and non-trig exactly what you are using for the renders ? I tried rendering te z^2+c and my implimentation of the trig and non-trig versions match but I don't get a result that looks much like your renders - so I assumed you're using solid at given iteration rather than on given DE threshold and set my DE threshold to 0 and maxiter to 12 but the result is still not much like yours.
Any ideas ?
 Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
bugman
Conqueror

Posts: 122

 « Reply #5 on: December 10, 2009, 01:29:28 AM »

Hi Paul, are the trig and non-trig exactly what you are using for the renders ? I tried rendering te z^2+c and my implimentation of the trig and non-trig versions match but I don't get a result that looks much like your renders - so I assumed you're using solid at given iteration rather than on given DE threshold and set my DE threshold to 0 and maxiter to 12 but the result is still not much like yours.
Any ideas ?

I am not using distance estimation (I never did get that to work for me). I don't know why your renders look different but feel free to post them if you think they are interesting.
 Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #6 on: December 10, 2009, 02:00:36 AM »

Here's what get for z^2+c, solid at 12 iterations:

And z^8+c, also solid at 12:

They were both rendered small, just at the uploaded sizes and 12 iterations is really overkill for that resolution
The z^2+c used the (unoptimised) non-trig version and took around 2.5 mins, the z^8+c used the trig version which means it was a bit slow at 8.5 mins (Times on my rather slow P4HT).
 Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #7 on: December 10, 2009, 02:30:33 AM »

Part of the z^8 caught my eye so I couldn't resist zooming in.
In doing so I discovered a problem with my formula with respect to getting the normals when the DE threshold is zero and solid is based solely on iteration depth so I had to switch to using maxiter 400, DE thrreshold 1e-4.
This image is at zoom *98.4, the full view was *3.5

Though it's a little "whipped cream"ish, it's the most interesting whipped cream I've seen so far on a Mandelbulb style fractal
I will definitely be doing a quality render of this.
 Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Paolo Bonzini
Guest
 « Reply #8 on: December 10, 2009, 07:02:18 AM »

Actually the phi rotation is applied about [sin(theta), -cos(theta), 0] instead of the y-axis (or [-sin(theta), cos(theta), 0] if you are rendering the latter version).

Since you're rotating Ry(phi) first and Rz(theta) second, wouldn't it make more sense to do the second rotation around "wherever the first rotation brought the z axis"?  That is in quaternion form:

$rot1 = e^{j\ \phi/2}$
$rot2 = e^{(rot1\ k\ rot1^{-1})\ \theta/2}
[tex]rot = rot2 * rot1$

(where the divisions by two are only to accomodate quaternion math, i.e. $e^{v\phi/2}$ is actually a rotation by $\phi$, and e^{v\alpha} is $cos \alpha + v sin \alpha$).
 Logged
bugman
Conqueror

Posts: 122

 « Reply #9 on: December 10, 2009, 07:11:25 AM »

I don't really understand your quaternion notation. Could you express your proposed formula in terms of {x, y, z}?
 Logged
Paolo Bonzini
Guest
 « Reply #10 on: December 10, 2009, 07:59:31 AM »

Nevermind, I tried the simplification myself with Maxima and I get exactly your "consistent algebra"!  Which kind of explains where it comes from, giving another explanation besides just reversing the phi rotation.

Basically, you are rotating first around the y axis.  Now, the z axis also moved as an effect of this rotation.  The second rotation is done around this "turned" z axis instead of the original axis.
 Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #11 on: December 22, 2009, 06:34:49 PM »

Had another play and got this "Flowerhead" from the same Mandy as "Theme Park Ride" (z^8+c):

If no image above then look here:

 Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
mrrgu
Guest
 « Reply #12 on: January 01, 2010, 04:40:40 PM »

Hi

I am trying to implement this, what formula do you use for the derivative (for DE) ?

The rotational matrix form of Mandelbulb triplex power formula goes as follows:
{x, y, z}^n = Rz(n*theta)*Ry(-n*phi)*{r^n, 0, 0}
where r = sqrt(x²+y²+z²), theta = atan2(y, x), phi = asin(z/r)

This formula actually does already apply the azimuthal angle (phi) rotation away from the azimuthal axis (z-axis). However, last week I got confused and I thought that I had to sandwich the y-axis rotation between an un-rotate / re-rotate pair of transformations. Hence the following formula:
 Logged
David Makin
Global Moderator
Fractal Senior

Posts: 2286

 « Reply #13 on: January 01, 2010, 05:03:26 PM »

Hi

I am trying to implement this, what formula do you use for the derivative (for DE) ?

I used my delta DE method rather than analytical DE, see:

http://www.fractalforums.com/mandelbulb-implementation/mandelbulb-ray-tracing-plugin-for-photoshop-aftereffects-and-quartzcomposer/msg10178/#msg10178
 Logged

The meaning and purpose of life is to give life purpose and meaning.

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
mrrgu
Guest
 « Reply #14 on: January 02, 2010, 06:31:13 PM »

Thank you.

Your method looked to complicated for the GPU many branches etc..so I tried to
write one with some intervall halving method... but so far my results are crap

I wonder if anyone has tested to get the derivative with some kind of difference ?
Like this:

.
.
Z1 = Z0^2 +C
Z2 = Z1^2 +C
Z3 = Z2^2 +C
.
.

And then derivatives.. DY/DX style like... (Z2-Z1)/(Z1-Z0), (Z3-Z2)/(Z2-Z1)... etc.
Or is this the wrong derivative? I mean not with respect to C ?

Hi

I am trying to implement this, what formula do you use for the derivative (for DE) ?

I used my delta DE method rather than analytical DE, see:

http://www.fractalforums.com/mandelbulb-implementation/mandelbulb-ray-tracing-plugin-for-photoshop-aftereffects-and-quartzcomposer/msg10178/#msg10178

 Logged
 Pages: [1]   Go Down