|
|
|
BradC
|
 |
« Reply #16 on: January 05, 2010, 11:27:59 PM » |
|
Yeah, same paper from Paolo Bonzini. I read it but I haven't tried playing with the formulas in it yet. I had a question about whether the two triplex rotations are collapsed into a single quaternion rotation, and whether that's valid when raising to a power, but I haven't looked into it.
|
|
|
|
|
Logged
|
|
|
|
|
BradC
|
 |
« Reply #17 on: January 05, 2010, 11:29:21 PM » |
|
|
|
|
|
|
Logged
|
|
|
|
|
kram1032
|
 |
« Reply #18 on: January 06, 2010, 12:03:54 AM » |
|
ah nice  Just looking into quaternions and dual quaternions... http://www.euclideanspace.com/maths/geometry/rotations/conversions/eulerToQuaternion/index.htm <- euler to quaterion (euler consists of three angles... which of them need to be doubled? http://www.euclideanspace.com/maths/algebra/realNormedAlgebra/other/dualQuaternion/index.htm <- dual quaternion (if you use the first rotation and then translation variant, you could do a single but direct transform for the Mandelbulb) in theory, all the needed information for triplex to quaternion should be there in just those two pages... But especially because of three euler angles rather than two spherical ones, I'm a bit confused about how to get the correct formulae.... However, it could provide interesting (more vortexy) results if all the three euler angles get doubled (multiplied by n) and the radius gets treated just as usual. the a b c component to be added in the end would go into the dual quaternion for translation. Then simplify that as much as possible and you'd have your correct quaternion formula (hopefully)
|
|
|
|
|
Logged
|
|
|
|
|
BradC
|
 |
« Reply #19 on: January 06, 2010, 03:57:01 AM » |
|
More pictures of  , and also  .
|
|
|
|
Logged
|
|
|
|
|
Paolo Bonzini
Guest
|
 |
« Reply #20 on: January 06, 2010, 09:35:25 AM » |
|
> In the paper, it was concluded that the quaternion variant (expressing the mandelbulb formula as a quaternionic transform) is both comutative and associative... If that's true, it would be interesting to see what happens if you plug that into mathematica... Maybe the results are more correct, then.... To clarify, we have: 1) polar triplex -> multiplication is associative, exponentiation works, no definition of addition, can be converted to and from (2) using trigonometry. 2) cartesian triplex -> just a normal vector, so addition is trivial but triplex multiplication does not work (in general not associative, gives wrong results when it exhibits nonassociativity), and exponentiation requires pre-expanding the formulas using Mathematica or similar 3) quaternions -> can express a triplex in both cartesian form (just take the (2) representation and make a quaternion with real part zero) or polar form (see paper). In the latter case, what you do is use a quaternion that represents a rotation. So, at any point you have to make sure whether your quaternion is a rotation or a vector: if it is a rotation, you can convert it to a vector using  , if it is a vector, the paper says how to convert it to a rotation. Rotation quaternions have basically the same properties as (1), except that performance is somewhat opposite: they can be converted quickly to and from cartesian form using multiplication/division/sqrt, but then multiplication and exponentiation are much more expensive than (1). Since quaternions never rely on trigonometry, addition on the "rotation form" could be defined in principle, but the formula would be huge. Also, I'm pretty sure that the result would not be distributive, but I might be wrong.
|
|
|
|
« Last Edit: January 06, 2010, 09:46:40 AM by Paolo Bonzini »
|
Logged
|
|
|
|
|
Paolo Bonzini
Guest
|
 |
« Reply #21 on: January 06, 2010, 09:53:02 AM » |
|
Yeah, same paper from Paolo Bonzini. I read it but I haven't tried playing with the formulas in it yet. I had a question about whether the two triplex rotations are collapsed into a single quaternion rotation, and whether that's valid when raising to a power, but I haven't looked into it.
Yes, they are. When you multiply two triplex numbers a and b, you have four rotations (az ay and bz by). You reorder them as "az bz ay by" and multiply the resulting four quaternions. All I did in the paper, besides showing how to write Mandelbulb iterations with quaternions, is to express the result in terms of the components of the quaternions that represent "az ay" and "bz by". This is actually easily done if you let the computer do the simplifications (I used Maxima).
|
|
|
|
|
Logged
|
|
|
|
|
twinbee
|
 |
« Reply #22 on: January 06, 2010, 09:56:53 AM » |
|
I'm not sure if I'm replicating the same object shown as BradC or Tglad (though Tgald's looks closer I guess). To simplify things, I'll look at this below: q --> q^8 - q^10/2 + c  ...Or more explicitly: q --> tadd[ tsub{ tpow(q,8) , tmul(tpow(q,10), 0.5) } , c ];
... where the above functions are defined as follows. Is multiplication/division defined okay? triplex tadd(triplex a, triplex b) { triplex n; n.x = a.x + b.x; n.y = a.y + b.y; n.z = a.z + b.z; return n; } triplex tsub(triplex a, triplex b) { triplex n; n.x = a.x - b.x; n.y = a.y - b.y; n.z = a.z - b.z; return n; } triplex tdiv(triplex a, double b) { triplex n; n.x = a.x / b; n.y = a.y / b; n.z = a.z / b; return n; } triplex tmul(triplex a, double b) { triplex n; n.x = a.x * b; n.y = a.y * b; n.z = a.z * b; return n; }
triplex tpow(triplex a, double p) { triplex n;
double r = sqrt(a.x*a.x + a.y*a.y + a.z*a.z) ; double phi = atan2( pow(a.x*a.x + a.y*a.y, 0.5) , a.z) ; double theta = atan2(a.y , a.x) ;
r=pow(r,p); phi = phi*p; theta = theta * p;
n.x = r * sin(phi) * cos(theta); n.y = r * sin(phi) * sin(theta); n.z = r * cos(phi); return n; }
|
|
|
|
« Last Edit: January 06, 2010, 10:16:48 AM by twinbee »
|
Logged
|
|
|
|
|
BradC
|
 |
« Reply #23 on: January 06, 2010, 10:26:53 AM » |
|
I did the same thing you did twinbee, except that my phi measures angles up from the equator rather than down from the north pole. (I did it like bugman's thread http://www.fractalforums.com/theory/triplex-algebra/.) I can't quite tell if Tglad's object matches one of ours. My code is like yours except for just these lines: triplex tpow(triplex a, double p) {
... same ...
double phi = atan2( a.z , pow(a.x*a.x + a.y*a.y, 0.5) ) ;
... same ...
n.x = r * cos(phi) * cos(theta); n.y = r * cos(phi) * sin(theta); n.z = r * sin(phi);
... same ...
}
|
|
|
|
|
Logged
|
|
|
|
|
BradC
|
 |
« Reply #24 on: January 06, 2010, 11:27:42 PM » |
|
The degree 2 version seems to have some potentially interesting areas. I'd like to see twinbee's nice lighting on it.
|
|
|
|
Logged
|
|
|
|
|
TedWalther
Guest
|
 |
« Reply #25 on: January 07, 2010, 06:42:06 AM » |
|
That looks incredibly exciting, BradC! I'm guessing as the iterations go up you'll find it is completely connected, as is the mandelbrot. For the order2 image, does it have an exact mandelbrot cross section somewhere?
|
|
|
|
|
Logged
|
|
|
|
|
twinbee
|
 |
« Reply #26 on: January 07, 2010, 11:57:52 AM » |
|
I can't seem to get the same shape. Brad, can you do me a favour and just render z^2 (without the z^4, z^6 stuff as well), just to see if our basic shape is the same.
How many iterations are you using? Also love to see a zoom into the thin stalk section on the right.
It does look pretty interesting indeed.
|
|
|
|
|
Logged
|
|
|
|
|
BradC
|
 |
« Reply #27 on: January 08, 2010, 02:08:50 AM » |
|
Brad, can you do me a favour and just render z^2 (without the z^4, z^6 stuff as well), just to see if our basic shape is the same.
If you're using the "n.z = r * cos(phi);" formula rather than the "n.z = r * sin(phi);" formula, then our results would look different. Here are plots of z --> z^2 + c (using the +sine formula). I don't see any bugs in my code, but I could have one (or more). I have both the cosine version (internally called White) and the sine version (internally called Nylander) implemented so I could render the cosine version too if you like.
|
|
|
|
Logged
|
|
|
|
|
twinbee
|
 |
« Reply #28 on: January 10, 2010, 04:55:12 PM » |
|
Tidied up my code base, so we can look at this a bit more now. So... we're using the "Positive Z-component" version of the Mandelbulb, but how many iterations did you use? (I used 15 iterations below) I have something pretty similar to you, though there are minor differences it would seem. For comparison, also see Paul Nylander's version here, or Jules Rules' version here. Here's mine: 
|
|
|
|
« Last Edit: January 10, 2010, 06:52:07 PM by twinbee »
|
Logged
|
|
|
|
|
twinbee
|
 |
« Reply #29 on: January 10, 2010, 05:39:37 PM » |
|
Here's the z^2 - z^4/2 + c adaption of my above order 2 bulb. This unfortunately doesn't seem to match your version at all. I used 15 iterations here... 
|
|
|
|
« Last Edit: January 10, 2010, 06:52:22 PM by twinbee »
|
Logged
|
|
|
|
|