Logo by Mahmut - 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: Support us via Flattr FLATTR Link
 
*
Welcome, Guest. Please login or register. March 28, 2024, 11:13:37 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: Mandelbulb complete formula  (Read 6582 times)
0 Members and 1 Guest are viewing this topic.
GliderKite
Guest
« on: November 10, 2010, 04:27:34 PM »

Hello, I'm an Italian boy particularly interested in the generation of fractals.
I created my own software to generate fractals as Mandelbrot, Julia in 2D and now I wanted to deal with ensembles such as Mandelbulb in 3D.

But I met some problems in the implementation of the formula.
Can someone help me telling me what is the complete formula for the standard Mandelbulb?

I already know what we are talking about here: http://en.wikipedia.org/wiki/Mandelbulb. But do not talk about how to change the implementation of the Mandelbrot set in Mandelbulb.

Help me please.

Thanks..
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #1 on: November 10, 2010, 05:31:45 PM »

hello and welcome to the forums, check this thread ( first 2 posts )
http://www.fractalforums.com/theory/triplex-algebra/
Logged

---

divide and conquer - iterate and rule - chaos is No random!
GliderKite
Guest
« Reply #2 on: November 10, 2010, 05:53:58 PM »

hello and welcome to the forums, check this thread ( first 2 posts )
http://www.fractalforums.com/theory/triplex-algebra/

Thanks, but how to use the "triplex" returned by "TriplexRoot"?

Let me explain.
The steps to implement the algorithm of Mandelbrot are:

1) Suppose we consider a small portion around the origin of a complex plane interval (-2, -2) - (2, 2).
2) Replaces, for each point considered, the corresponding coordinates to the complex known term c, the equation Z = z^2 + c, with initial z = 0 + 0i.
3) Calculate the value of Z.
4) If you find that the distance from the origin of Z is greater than two, jump to step 6. To calculate this distance, we take the Pythagorean theorem as follows: given Z = a + bi, the square of the distance d from the origin will be d^2 = a^2 + b^2.
5) If not, it increments a counter and a return to step 3 if the counter has a value less than the predetermined maximum number of iterations, after giving z = Z.
6) It colors the point of a different color depending on the value of the counter.
7) Resets the counter and return to step 2, to calculate the color of the next point.
8-) The process will end when all the issues involved have been prosecuted in that way.


Now, what are the steps to generate the Mandelbulb set?
In addition, the formulas to be used to generate the set are all in your link?


Thanks.





« Last Edit: November 10, 2010, 05:56:55 PM by GliderKite » Logged
GliderKite
Guest
« Reply #3 on: November 11, 2010, 12:05:57 PM »

No one knows how to solve the problem?
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 7044


formerly known as 'Trifox'


WWW
« Reply #4 on: November 11, 2010, 12:46:39 PM »

the triplex is used as the "Z" value, and you use a box to calculate on (-2,-2,-2) - ( 2,2,2)
the equation z^2+c can be calculated for 3 value based numbers, using triplex math, adding is easy, just add componentwise, for squaring use the triplex squaring method
then you have a field of inside/outside pixels, in 3d it is hard to visualise, because plain dot clouds are of bad quality, the method
used for rendering it is via ray marching, kind of raytracing, where you shoot rays in the room, and check for collision with the surface of the fractal ( inside/outside change )

Logged

---

divide and conquer - iterate and rule - chaos is No random!
GliderKite
Guest
« Reply #5 on: November 11, 2010, 01:43:50 PM »

May you write as I did at least the step to the set of Mandelbulb?

Then I will ask for formulas, because without a scheme I can not go on ...
Logged
GliderKite
Guest
« Reply #6 on: November 13, 2010, 01:10:33 AM »

Vorrei ringraziare il tenero gigione per l'esauriente risposta.

There's somebody who understood my question?  smiley
Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #7 on: November 13, 2010, 12:04:16 PM »

Here's a function (cosine version I think) I have as spare which calculates the complete formula. It's very unoptimized though!

The function takes an x, y and z, and then calculates whether that point is part of the set.

Code:
bool MandelbulbFULL(double x, double y, double z) {
double power=8; // Adjustable
double iterations=5; // Adjustable

double newx; double newy; double newz;
newx=x;newy=y;newz=z;
double flag=0; int counter=0;
do  {
counter++;
if (counter==  iterations  +1) break; // Give up trying to prove guilty. point is innocent, and is in set.
 
// square:
double r     = sqrt(newx*newx + newy*newy + newz*newz) ;
double phi   = atan2( sqrt(newx*newx + newy*newy) ,      newz  );
double theta = atan2(newy , newx) ;
r = pow(r,power);
phi *=power; theta *=power;
newx = r * cos(theta ) * sin( phi  ) ;
newy = r * sin(theta ) * sin( phi  ) ;
newz = r * cos( phi  );

// add:
newx += x; newy += y; newz += z;
} while (newx*newx + newy*newy + newz*newz  <  1.25);

if (counter!=iterations+1) return false;
else return true;
}
Logged
GliderKite
Guest
« Reply #8 on: November 13, 2010, 12:23:32 PM »

Thanks, you understood perfectly.

So this forumla calculates whether that point is part of the set.

The color of the image I choose based on the number of what?

How should change the parameters of the function (x, y, z)?
What should be their range?

What is flag?

And finally: why< 1.25?
« Last Edit: November 13, 2010, 01:56:36 PM by GliderKite » Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #9 on: November 13, 2010, 01:37:10 PM »

Quote
The color of the image I choose based on the number of what?

The default is just white. You can colour it if you like, but for many of my first pictures, I created colour by using shadow and coloured light sources.

Quote
How should change the parameters of the function (x, y, z)?

What should be their range?

x, y & z bounds from +-1.02 to +-1.04 roughly for power 8. For the power 2 version, it could go as far as -+1.5.

Quote
And finally: why< 1.25?

Above 1.25 is the point that the formula 'gives up' and decides that it's going to spiral out to infinity, rather than close in to the origin at 0,0,0. Thus the point is not part of the set in that case. Remember in the case of the normal 2D Mandelbrot, that <2 is often chosen I think.
« Last Edit: November 13, 2010, 01:39:47 PM by twinbee » Logged
GliderKite
Guest
« Reply #10 on: November 13, 2010, 02:43:00 PM »

How can I understand the points that only belong to the Mandelbulb's surface?

Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #11 on: November 14, 2010, 01:09:36 AM »

Just like the Mandelbrot, the Mandelbulb is solid. Determining the points for the surface only could be a difficult task (especially if you want an accurate thickness all the way around).
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
THE formula for Mandelbulb? Theory ZsquaredplusC 6 10119 Last post November 22, 2009, 11:33:21 PM
by s31415
Massive thanks to Mandelbulb.. my animation is complete! Meet & Greet apewax 2 1535 Last post February 14, 2012, 02:10:48 PM
by cKleinhuis
can someone confirm correctness of uf5 mandelbulb formula? General Discussion « 1 2 » cKleinhuis 24 6729 Last post April 13, 2012, 12:57:41 PM
by cKleinhuis
First mint complete Images Showcase (Rate My Fractal) Eric B 0 1047 Last post August 04, 2012, 01:10:18 AM
by Eric B
Extract mathematical formula from Mandelbulb feature request « 1 2 » grasshopper 19 10332 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.16 seconds with 24 queries. (Pretty URLs adds 0.009s, 2q)