Logo by wmauzey - 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: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. August 21, 2019, 01:46:01 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: Question about Formula  (Read 1288 times)
0 Members and 1 Guest are viewing this topic.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« on: June 24, 2010, 08:44:43 PM »

  Jesse,  

 I'm pretty sure I saw you mention using someone's streamlined formula for calculating Mandelbulbs, and I wanted to compare it to something I just threw together.

  Do you have a link to the thread with the formula, or know what I should search for?   You could also glance at the following code and tell me if it is the same... but that may be more complicated.  cheesy

Code:
r1=sqrt (sqr(sy) + sqr(sz));  // sx, sy, and sz are the starting x, y, and z components of the iteration
r3=r1^(-n);

victor=complex(sx,r1);     // complex (variable_1, variable_2) converts 2 reals into a complex number
bravo=complex(sy,sz);     //  z= variable_1 + [i]i[/i] * variable_2
victor=victor^n;  // you could write a script, so if n is 4, do sqr(sqr(victor)), if n=6 do sqr(victor)*sqr(sqr(victor)) ... etc.  
bravo=bravo^n;

nx=real (victor);                            // real grabs the real component of a complex number
ny=imag (victor)*real (bravo) * r3;   //  imag grabs the imaginary component of a complex number
nz=imag (victor)*real (bravo) * r3;   //  nx, ny, and nz are the intermediate x, y, and z components of the iteration

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;

} else {
sx=nx+(pixelr);
sy=ny+abs(pixeli);    //  because this is the "Christmas tree fractal" (Name from Bugman's website)
sz=nz+(pixelj);         //  and it's really distorted for -y values, I take the absolute value of y... reflects it over the axis as well
}
z=quaternion(sx,sy,sz,0);   // for color assignment, nothing to do with the calculation of the fractal
bail=abs(sx)+abs(sy)+abs(sz);    // bailout is absolute value, avoid squaring numbers...
« Last Edit: June 24, 2010, 10:05:02 PM by M Benesi » Logged

Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #1 on: June 24, 2010, 09:26:32 PM »

Hmm, the only thing what comes into my mind is a conversation with David Makin about his implementation of formulas for Ultrafractal.

So you could search for "MMFwip3D.ufm" for the code, should the code be for the common mandelbulbs?
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #2 on: June 24, 2010, 10:08:42 PM »

  Lol. 

  Jesse- it gives me your message about searching for "MMFwip3D.ufm" when I search for it.  cheesy 

  Hilarious. 


  Maybe it was somewhere else.  I recall someone mentioning using someone's algebraic "faster" formula in some software... and I know the complex-triplex method I used above speeds things up nicely (especially for lower powers, or for higher powers if you sqr(sqr(sqr(X))) for z^8, etc...).
Logged

Jesse
Download Section
Fractal Schemer
*
Posts: 1013


« Reply #3 on: June 24, 2010, 10:29:34 PM »

You could also try it on google or use "MMFwip3D.zip" instead.  smiley

David uses a fast method for the integer powers in that file.

Then there are the pure non-trig versions like these:
http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg8680/#msg8680
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #4 on: June 25, 2010, 07:45:09 AM »

Thanks Jesse, downloaded it (google pointed me back to here...). 

  Ok.. that is fricken long.  Never find the formula in there.  NM... I might ask around later.

  The algebraic formulas are similar to the complex triplex I am using, except the complex triplex lets you go a bit faster, perhaps  (unless my initial implementation of algebraic versions was incorrect or inefficient) .

  I noticed drop offs in performance above z^4 or 5 for algebraic write outs (compared to trig versions) but the performance of the complex triplex still (barely) exceeds that of trig formulas at z^13... and can be improved even further by the old sqr(sqr(sqr(z))) trick (thats z^8 in 3 squares (3 multiplications) instead of 8 multiplications...).

Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
question about formula reset and some more... Mandelbulb 3d cKleinhuis 9 1796 Last post December 29, 2010, 01:55:39 AM
by cKleinhuis
Question for anyone Let's collaborate on something! Dean 3 746 Last post January 01, 2012, 03:28:50 PM
by David Makin
Question about parameters ( formula; AexionC ) Mandelbulb 3d TsarveK 5 915 Last post March 09, 2012, 12:05:34 PM
by DarkBeam
Quick formula question Mandelbulb 3d Glitchraptor 8 865 Last post March 20, 2015, 10:51:44 PM
by DarkBeam
jcube formula question Mandelbulb 3d jamesbradleym 7 805 Last post January 25, 2017, 08:13:53 PM
by jamesbradleym

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