bugman
|
 |
« 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:
|
|
« Last Edit: December 12, 2009, 08:48:23 PM by bugman »
|
Logged
|
|
|
|
kram1032
|
 |
« 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
|
 |
« Reply #3 on: December 10, 2009, 12:15:47 AM » |
|
Looks like a hairybrot or furrybrot to me!
|
|
|
Logged
|
|
|
|
David Makin
|
 |
« 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
|
|
|
|
bugman
|
 |
« 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
|
 |
« 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
|
|
|
|
David Makin
|
 |
« 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
|
|
|
|
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:  ![rot2 = e^{(rot1\ k\ rot1^{-1})\ \theta/2}<br />[tex]rot = rot2 * rot1](/cgi-bin/mimetex.cgi?rot2 = e^{(rot1\ k\ rot1^{-1})\ \theta/2}<br />[tex]rot = rot2 * rot1) (where the divisions by two are only to accomodate quaternion math, i.e.  is actually a rotation by  , and e^{v\alpha} is  ).
|
|
|
Logged
|
|
|
|
bugman
|
 |
« 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
|
|
|
|
|
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
|
 |
« Reply #13 on: January 01, 2010, 05:03:26 PM » |
|
|
|
|
Logged
|
|
|
|
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  My respects to your alg! 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 ?
|
|
|
Logged
|
|
|
|
|