Logo by Pauldelbrot - 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: Did you know ? you can use LaTex inside Postings on fractalforums.com!
 
*
Welcome, Guest. Please login or register. April 19, 2024, 11:39:16 PM


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 formula for Mandelbulb?  (Read 10497 times)
0 Members and 3 Guests are viewing this topic.
ZsquaredplusC
Guest
« on: November 21, 2009, 07:10:33 AM »

Hello all,

Can we now clarify the formulas used to create the Mandelbulb?

I have been using the formulas from Christian here
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8763/#msg8763

They seem to work OK and I am getting some results that show the brocolli etc (how do I insert an image inline to a posting here?)

But then on Daniel's page here http://www.skytopia.com/project/fractal/2mandelbulb.html#iter they are different and if I use those versions, specifically...
r = sqrt(x*x + y*y + z*z )
theta = atan2(sqrt(x*x + y*y) , z)
phi = atan2(y,x)
...I get a blank image.

Can we have a posting that gives the final Mandelbulb formulas?

I am sure this will help people like me who after going through a printout of 163 pages ugly of printouts of the original thread can have a definitive "this is what you need to use" reference.

Also the non trig formulas here
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680
They are only for the z^exponent parts (as in the z^4 part of z^4+c) right?  If I use those speedups then I still need to do the trig distance estimation calcs?

Thanks for any tips.  I am sure if there was a definitive reference it would help others like me who are not up with the mathematics invlolved.
Logged
s31415
Conqueror
*******
Posts: 110



WWW
« Reply #1 on: November 21, 2009, 04:48:01 PM »

I think that the conceptual way to put it is that to "raise a 3d vector to a power p", you:
- Switch to spherical coordinates, with an azimut running between 0 and 2pi and an elevation running between -pi/2 and pi/2 so that the equator lies at zero elevation.
- Raise the radius to power p and multiply both the azimut and the elevation by p. If the elevation gets out of the [-pi/2, pi/2] range, you can either add pi to phi or leave it as it is. Most people leave it as it is. See this post by Jos Leys for a comparison of the two methods:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8743/#msg8743
- Switch back to cartsian coordinates.
Logged

s31415
Conqueror
*******
Posts: 110



WWW
« Reply #2 on: November 21, 2009, 04:49:00 PM »

Oups, sorry, I said "add pi to phi", in my mind, phi is the azimut...
Logged

fractalrebel
Fractal Lover
**
Posts: 211



WWW
« Reply #3 on: November 21, 2009, 07:30:12 PM »


I am sure this will help people like me who after going through a printout of 163 pages ugly of printouts of the original thread can have a definitive "this is what you need to use" reference.


I also haven't gone through the 163 pages. Here is what I do (in UltraFractal 5):

r = sqrt(x^2 + y^2 + z^2)<br />phi = atan2(x,y)<br />theta = asin(-z/r)<br />r = r^p<br />phi = p*phi<br />theta = p*theta<br />x = r*cos(theta)*cos(phi)<br />y = r*cos(theta)*sin(phi)<br />z = r*sin(theta)
    
« Last Edit: November 21, 2009, 07:35:11 PM by fractalrebel, Reason: typos » Logged

David Makin
Global Moderator
Fractal Senior
******
Posts: 2286



Makin' Magic Fractals
WWW
« Reply #4 on: November 21, 2009, 07:52:02 PM »

I think the best reference for this so far is the one already quoted, i.e. Paul Nylander's definition which also gives some of the non-trig versions:

http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680

In my case my current formula for UF uses that method except the original version that Paul refers to where the sign of the final "z" term is reversed - I'm going to add the option to use the +sine version as an alternative.

Another way of writing the (positive sine) same formula in Ultra Fractal is:

            ztemp = ((r=cabs(zri)) + flip(zj))^@mpwr
            zri = real(ztemp)*(zri/r)^@mpwr + cri
            zj = imag(ztemp) + cj

Where ztemp, zri and cri are complex and r, zj, cj and @mpwr are real though @mpwr could be complex.

Historically speaking I believe the negative sine version was preferred as it has less "whipped cream" on the z^2+c version smiley But I agree with Paul in his comments about the positive sine version being more "correct" mathematically speaking.

Obviously in the above real/complex version to get fractalrebel's method just negate imag(ztemp) in the zj term.


« Last Edit: December 01, 2009, 11:04:29 PM by David Makin » Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
ineri
Guest
« Reply #5 on: November 21, 2009, 09:32:18 PM »


I have just a simple question, based on the geometric interpretation, i.e., the rotations, phi is periodic, but theta is not, so has anyone tried to see what happens if you respect this. If you move theta out of its domain you should flip phi as you are actually now on the other side of the sphere. You are basically working with a double covering of the sphere by not doing this.

//Ingemar Eriksson
Logged
s31415
Conqueror
*******
Posts: 110



WWW
« Reply #6 on: November 22, 2009, 11:33:21 PM »

See this post by Jos Leys:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8743/#msg8743
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Mandelbulb complete formula 3D Fractal Generation GliderKite 11 6850 Last post November 14, 2010, 01:09:36 AM
by twinbee
can someone confirm correctness of uf5 mandelbulb formula? General Discussion « 1 2 » cKleinhuis 24 7814 Last post April 13, 2012, 12:57:41 PM
by cKleinhuis
Would this M3D formula be possible? feature request lxh 1 1546 Last post October 05, 2012, 03:19:09 AM
by lxh
@jesse - save formula as new formula ?! feature request cKleinhuis 0 5026 Last post October 10, 2012, 05:43:14 PM
by cKleinhuis
Extract mathematical formula from Mandelbulb feature request « 1 2 » grasshopper 19 11643 Last post February 28, 2013, 01:53:39 PM
by cKleinhuis

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.163 seconds with 26 queries. (Pretty URLs adds 0.01s, 2q)