Logo by DsyneGrafix - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit us on facebook
 
*
Welcome, Guest. Please login or register. April 19, 2024, 08:16:58 AM


Login with username, password and session length


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


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: The REAL math of the Mandelbulb  (Read 4004 times)
0 Members and 1 Guest are viewing this topic.
Paolo Bonzini
Guest
« on: December 08, 2009, 01:29:39 AM »

[LONG POST]

Finally I got it.  The "triplex numbers" are really quaternions in disguise, and the "z = z^N+c" is really "v = |v|^N (q(v)^N i q(v)^-N) + c", where v is a 3D vector and q(v) is a function from a 3D vector v to a quaternion.  For example, in the reversed-sign definition (the one giving (x,y,z)^0=(1,0,0), in the "old" ;-) terminology) you have these:

1) rotation by theta along z is expressed by cos(theta/2) + k sin(theta/2)

2) rotation by -phi along y is expressed by cos(phi/2) - j sin(phi/2)

and multiplying them gives

q(v)     = cos(theta(v)/2) cos(phi(v)/2) + i sin(phi(v)/2) sin(theta(v)/2) - j cos(theta(v)/2) sin(phi(v)/2) + k sin(theta(v)/2) cos(phi(v)/2)
q(v)^-1 = cos(theta(v)/2) cos(phi(v)/2) - i sin(phi(v)/2) sin(theta(v)/2) + j cos(theta(v)/2) sin(phi(v)/2) - k sin(theta(v)/2) cos(phi(v)/2)

where theta(v) and phi(v) are the usual functions arctan(y/x) and arcsin(z/|v|) for conversion to spherical coordinates.

As a sanity check, let's see what happens on the xy plane.  Remember that, at every iteration, a different rotation is applied!!!  However since the elevation is 0 for the initial vector, they will all have phi(v)=0 and q(v) takes the form

q(v) = cos(arctan(y/x)/2) + k sin(arctan(y/x)/2)

then

v = i x + j y
q(v) i q(v)^-1 = i cos(theta) + j sin(theta)
|v|^2 q(v) i q(v)^-1 = |v|^2 (i cos(theta) + j sin(theta))

which is of course complex squaring, just changed to use i/j instead of real/imaginary.

This may well mean that this is not "the real 3D mandelbrot"; after all, why should one definition of q be better than the others?  Or it may mean that they are all "real 3D mandelbrots" of course.  It depends on how optimist you are. smiley  So, the ultimate quest is to study the space of q(v)...

That's way beyond my knowledge of math, but there is a lot of other work to do; I am halfway through the math for the cartesian<->polar conversion, for example.  Can you compute q(v) in cartesian coordinates?  It is not the same (see the other thread) to compute q(v)^N using repeated multiplication of quaternions and to use repeated multiplication of triplex numbers.  (The latter doesn't work).  Why?

Triplex numbers still have their place in various ways, and they are worth further investigation.  First because they are faster than quaternions :-) (or are they?...).  Second because the quaternion notation for mandelbulbs does not extend to 4D or more, so a deeper understanding of the "triplex number" representation is fundamental to extend the mandelbulb beyond 3D.

Possible steps, beyonds those I have already outlined, include:

1) to try and understand what triplex multiplication actually means (if anything) and what it means that triplex numbers commute; maybe there is a better, noncommutative but associative definition of multiplication?

2) to convert my definition of triplex exponential in terms of quaternion exponentials and see what happens;

3) to try and understand what it means that powers of triplex numbers use a (-pi, pi) range for the elevation (see the other thread).  How does this relate to cartesian formulas for triplex exponentiation?  What is different between computing v^n and v*v*v on a triplex number?

So far, everything seems to make sense...  It's kind of funny that the Mandelbulb started from "let's go away from quaternions", and ends up again dealing with quaternions!...
« Last Edit: December 08, 2009, 11:12:56 AM by Paolo Bonzini » Logged
zee
Guest
« Reply #1 on: December 08, 2009, 02:41:01 AM »

It seems you tried a lot of things before you found this cheesy

I think this brings not much knowledge but makes everything more complicated.

Maybe I didn't understand it because I don't speak english very well and I didn't understand why that should be like you wrote down.
But I'll trust you that your equations are correct and work.

My problem:

We have (2d) complex numbers - we get a mandelbrot by using z -> z^2+c with fixed point in (0,0)
We have (3d) triplex numbers - we get a mandelbulb by using z -> z^2+c with fixed point in (0,0,0)

Okay - We can describe both with a transformation with trignometric equations. (2d or 3d transformation)

But the complex numbers do this transformation only by the definition that i^2 = -1 (That creates the Mandelbrot). And thats the most amazing thing.

So what's about the triplex?

You didn't explained triplex by a 3d hypercomplex number but by quarternions AND a vector AND using the trigometric equations instead of squaring a linear combination of complex basis like in the definition of hypercomplex numbers.

I think the best thing in this is that you got a equation for z^n but its more complicated than the normal trigometric definition.
« Last Edit: December 08, 2009, 02:49:10 AM by zee » Logged
Paolo Bonzini
Guest
« Reply #2 on: December 08, 2009, 02:59:00 AM »

No, I didn't really try many things.  I just started from quaternions=rotations and saw where it led me...

I know this is more complicated than the triplex, but there is a reason why mathematicians could never get 3D complex numbers to work... they're all much smarter than I am.  So I want to use well-tested concepts.  As I said, the triplex is important, but if you want to understand _why_ it works, you have to reason in terms of well-known mathematical objects.  Otherwise you risk ending up trying to square the circle.  I felt this way several times in the last few days, this definition is much less "risky".

Also, my definition includes all variations of the Mandelbulb, while in the other thread we were focusing on one particular version.  Wouldn't it be nicer to understand what is common to all of them, i.e. what happens when you rotate (that's q(v)^N i q(v)^{-N}) and stretch (that's |v|^N) by amounts that depend on where you are in 3D space.
Logged
Paolo Bonzini
Guest
« Reply #3 on: December 09, 2009, 09:46:54 PM »

Would you change your mind on quaternions if I told you that the 2D mandelbrot can be written as v=vi\bar v+c? :-)

In the formulation of the top post it is v=qi\bar q+c with q(v)=vi.  I find that quite aesthetically appealing. :-)
« Last Edit: December 09, 2009, 09:50:20 PM by Paolo Bonzini » Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #4 on: December 10, 2009, 03:59:25 PM »

I'm not enough of a mathematician to fully appreciate what you've done, but hey, it could be promising - well done!

One question; are as many properties in the 3D hypercomplex realm lost as much as say, octonions are? Higher dimensional number systems suffer from greater 'losses' such as noncommutativity, and I was wondering how dimension 3 fared on this scale.
« Last Edit: December 10, 2009, 04:01:06 PM by twinbee » Logged
Paolo Bonzini
Guest
« Reply #5 on: December 10, 2009, 04:21:41 PM »

I'm not enough of a mathematician to fully appreciate what you've done, but hey, it could be promising - well done!
Thanks for the kind words.

One question; are as many properties in the 3D hypercomplex realm lost as much as say, octonions are? Higher dimensional number systems suffer from greater 'losses' such as noncommutativity, and I was wondering how dimension 3 fared on this scale.
Uhm, as badly as possible.  Worse than any 2^N-ions.  Octonions lose associativity, sedenions lose alternativity, but all of them keep power associativity; Paul's 3D things are not power associative.

I'm writing down the things above in a paper, the WIP link is http://github.com/bonzini/mbulb/raw/master/mbulb.pdf

The gist of it (which I haven't written yet) is: there may be no 3D Mandelbrot (just an infinite family of them), but what you did makes a lot of sense and can be handled in a mathematically rigorous way.  Let me know if you find the WIP paper unreadable or just bad; or feel free to send me nice pictures to include. :-)
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #6 on: December 10, 2009, 05:33:53 PM »

I'm not enough of a mathematician to fully appreciate what you've done, but hey, it could be promising - well done!
Thanks for the kind words.

One question; are as many properties in the 3D hypercomplex realm lost as much as say, octonions are? Higher dimensional number systems suffer from greater 'losses' such as noncommutativity, and I was wondering how dimension 3 fared on this scale.
Uhm, as badly as possible.  Worse than any 2^N-ions.  Octonions lose associativity, sedenions lose alternativity, but all of them keep power associativity; Paul's 3D things are not power associative.

I'm writing down the things above in a paper, the WIP link is http://github.com/bonzini/mbulb/raw/master/mbulb.pdf

The gist of it (which I haven't written yet) is: there may be no 3D Mandelbrot (just an infinite family of them), but what you did makes a lot of sense and can be handled in a mathematically rigorous way.  Let me know if you find the WIP paper unreadable or just bad; or feel free to send me nice pictures to include. :-)

At least they *are* comutative wink
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 #7 on: December 12, 2009, 02:55:28 AM »

At least they *are* comutative wink

But the cartesian formulas for them are bogus wink

I finished my paper, feel free to post criticism and corrections, or to suggest points where it's not clear.  I'll probably add an appendix with expanded formulas or algorithms, but the important stuff is there or it can be looked up on Wikipedia.

Regarding speed, it looks like it is mostly the same as Paul's formulas for N=2 (counting operations).  However, with quaternions doubling N costs only additional 7 multiplications and 3 additions because of associativity, while Paul's formulas quickly get more complicated and harder to optimize.
Logged
JosLeys
Strange Attractor
***
Posts: 258


WWW
« Reply #8 on: December 12, 2009, 10:27:58 AM »

Quote
I finished my paper, feel free to post criticism and corrections

Where do we find the finished paper?
Logged
Paolo Bonzini
Guest
« Reply #9 on: December 12, 2009, 11:51:58 AM »

Quote
I finished my paper, feel free to post criticism and corrections

Where do we find the finished paper?

At the usual place, but only after I am reminded to push it there. :-)
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
All Fract Up - The Beauty of Math by Bruce Berryhill Commercial Corner Fractal_Artist 0 2607 Last post March 14, 2009, 04:44:47 AM
by Fractal_Artist
GigaBroccoli: Real time Mandelbulb into a sparse voxel octree Videos CyrilCrassin 6 4952 Last post March 11, 2010, 09:37:47 PM
by LeonardC
Real 3D Mandelbulb 3D Fractal Generation Jules Ruis 0 1943 Last post April 05, 2010, 06:43:56 PM
by Jules Ruis
The real 3D Mandelbulb does not have bulbs Mandelbulb Implementation Jules Ruis 7 6411 Last post May 25, 2010, 12:50:13 PM
by Jules Ruis

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.137 seconds with 26 queries. (Pretty URLs adds 0.006s, 2q)