Logo by mauxuam - 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 24, 2024, 11:34: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 2 3 [4] 5 6 ... 8   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: An old formula revised  (Read 26557 times)
0 Members and 1 Guest are viewing this topic.
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #45 on: September 12, 2012, 08:35:31 PM »

When you finished mangling leave the formula to us grin

lol...  You're awesome...
   I've still got a few ideas floating in my brain, so might hold off until I try them out so we don't have last minute code changes.  After I try the ideas, I'll try and finalize, in other words clean up my crazy code, then get something posted.  

 I've gotta shop, run, cook dinner, etc.  (I'm in  UTC -4 hours)   so it'll be a bit before I get to it.

@miner49er- No cross-section, don't even know if it's possible with the interplay of the 2 formulas.  My intent is to mess with a 2d version of my Mag. vs. XYZ fractal (so it'd be mag vs. xy) and attempt to recreate the 2d mandy with that- but that's in the future.

  Now, a certain formula I came up with will definitely have the cross section, but I cannot implement it in ChaosPro.  It requires each yz-plane (perpendicular to x-axis) section to be analyzed individually- you can't just analyze pixels like this formula.

@kram1832- I dunno.  It doesn't seem to have the same type of whipped cream as the old bulbs.  It seems to be more like the 2d Mset, in which there are more detailed sections, and sections with less detail until you iterate more.

  Check out this little (low iteration) image from the 2d mandy.  There are smooth curves, in addition to pointy things, and areas with more details.  Keep in mind, the 3d images all have less iterations than this.

  
« Last Edit: September 12, 2012, 08:37:56 PM by M Benesi » Logged

kram1032
Fractal Senior
******
Posts: 1863


« Reply #46 on: September 12, 2012, 09:39:00 PM »

Yeah, I guess 3D fractals of this complexity don't work well with extreme iteration depths. They turn into a fuzz, don't they?
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #47 on: September 13, 2012, 05:29:27 AM »

  Fuzz... or zoom in to 'em.  

  I've been laughing about "when you're done mangling" all day..  cheesy

 I like the original formula better (with the Mag xyz first), I think it looks cooler....  It's a bit more complicated, and I'm a bit tired right now.

  I'm going to post it, but I really will need to check it tomorrow when I am not as tired as I am at the moment.  In other words, don't implement this code thinking I've checked it thoroughly and accurately.  I might check it thoroughly and miss something due to brain fatigue.... if that's even possible.  :p

First part is the pixel set up.  We need to rotate our pixel components to provide the initialization for the first calculation.  The reason is the first calculation is of the Mag vs. XYZ fractal type, which has its axis of symmetry along the "magnitude axis", which corresponds to the line where x=y=z.  We want to align our axes of symmetry for the 2 formulas.

Code:
			// pixel part set up
//pixel_x= x part of pixel
//pixel_y= y part of pixel
//pixel_z= z part of pixel

//rotation around y axis, no y rotation

foxtrot=(90-54.7356)/180*pi;      //look up "magic angle"  54.7356 ...  it turns up a lot
whiskey= cos((foxtrot));             //  sqrt(2/3)
tango= sin((foxtrot));              // sqrt(1/3)

pixel_x_temp= pixel_x  * whiskey - pixel_z * tango;    //  I use sx,sy,and sz as variables in my iterations
sz= pixel_x  * tango     +  pixel_z * whiskey;        // along with temp variables nx,ny, and nz


//rotation around z axis, no z rotation

foxtrot=45/180*pi;
whiskey= cos((foxtrot));       // in other words, both of these = sqrt(.5)    that's   sqrt ( 1/2 )
tango= sin((foxtrot));        // just setting it up so you can see the rotation matrix

sx= pixel_x_temp * whiskey - pixel_y * tango;
sy= pixel_x_temp * tango     +  pixel_y * whiskey;

// that's it for our initialization values for the pixels, we just need our values for the mag xyz portion
  
  a= (pi/2)^(3-n)              //  n is of course the exponent of z^n
  b= n * pi/2          // I sometimes use a different equation- this one is fine for now!!!


  So now we have our initialization values.  Time for the iteration loop.  

Code:
			r=(sqr(sx)+sqr(sy)+sqr(sz));
r1=(sqr(sx)*a+r)^(n/2);    //  you can do different values of n for the different formulas
r2=(sqr(sy)*a+r)^(n/2);   //   for now, let's just get this main one working
r3=(sqr(sz)*a+r)^(n/2);    //  btw, here is where "a" is used
r=sqrt(r);

theta= atan2  (abs(sx)*b+flip(r));     // here is where "b" is used
phi=  atan2     (abs(sy)*b+flip(r));
tango=  atan2  (abs(sz)*b+flip(r));

//  in this next section, I add in a "seed" value... USE -.5  for now!!!  negative point five!!!  :p

sx=r1*cos(theta*pixeln)      + seed;     // use the same seed for all 3 of these values
sy=r2*cos(phi*pixeln)     + seed;      //  -.5 is good, keep the seed the same so the fractal
sz=r3*cos(tango*pixeln)     + seed;   // does not get distorted

//now we need to rotate all the components back towards the x-axis for our Mandy portion
//We will rotate them the OPPOSITE direction than we did before, and in opposite order!!!

//rotation around z axis, no z rotation
foxtrot=-45/180*pi;
whiskey= cos((foxtrot));     // sqrt(.5)
tango= sin((foxtrot));        // -sqrt(.5)       NEGATIVE... they are not the same!!

nx=sx*whiskey-sy*tango;
sy=sx*tango+sy*whiskey;    // sy is done!!
sx=nx;


//rotation around y axis, no y rotation
//whiskey=54.7356/180*pi;
foxtrot=-(90-54.7356)/180*pi;    //negative!#!@
whiskey= cos((foxtrot));      //sqrt(2/3)
tango= sin((foxtrot));       //  - sqrt(1/3)    NEGATIVE!#!@#   RAAARRRRR!@$#!

nx= sx  * whiskey - sz * tango;        
sz= sx  * tango     +  sz * whiskey;
sx=nx;


//  we are totally rotated and ready for the Mandy portion of our

r2=(sqr(sx)+sqr(sy)+sqr(sz))^(n/2);

theta=n* atan2((sx)+flip(sqrt(sqr(sy)+sqr(sz))));
phi=n* atan2((sy)+flip((sz)));
    // note that you don't have to divide the positive x_pixel by 2
if (x_pixel>0) {x_pixel=x_pixel/2;}    // x_pixel is the x component of the pixel!!!!
nx=r2*cos(theta)  + x_pixel;      //  .5 * x_pixel for the positive x axis!!!
     //or you need to do my detail switch
   // otherwise there will be a section of elephant valley without details
   //   note that using .5* x-pixel on the positive x axis simply reduces the
   // smooth singularity in the center of elephant valley, the detail switch eliminates it
// detail switch:

if (detail_switch) {
if (n==2 || n==6) {
if (pixel_x >0 && sx> sqrt(sqr(sy)+sqr(sz))) {
nx=-nx;
}
} else if (n==3 || n==5  || n==7 || n==9)    {
if (sx>0) {
nx=-nx;
}
}
}
sx=nx;
sy=r2*cos(phi)*sin (theta);      //  for even n, switching the y and z parts makes a more
sz=r2*sin(phi)*sin (theta);       //  symmetric fractal.. it's sort of cool, but I don't
  //  know if it's better...   I'll post a couple images after this code
 // you can add in all pixel components at this stage, but it's chaotic

  //UPDATE:  I'd definite switch the y and z components, maybe make it optional
  //UPDATE:  I like the symmetry it introduces- you still get TONS of interesting details
  //UPDATE:  but they are more symmetric (less distorted)

// time to rotate back towards our other axis of symmetry before we start out next iteration!!
//we are doing this in the original order, with POSITIVE rotations!

//rotation around y axis, no y rotation

foxtrot=(90-54.7356)/180*pi;    //positive again        
whiskey= cos((foxtrot));        //  sqrt(2/3)
tango= sin((foxtrot));     //   sqrt(1/3)           totally positive... +++++++++

nx= sx  * whiskey - sz * tango;
sz= sx  * tango     +  sz * whiskey;
sx=nx;

//rotation around z axis, no z rotation
foxtrot=45/180*pi;
whiskey= cos((foxtrot));     //    sqrt(.5)
tango= sin((foxtrot));    //  sqrt(.5)      ++++++++

nx=sx*whiskey-sy*tango;
sy=sx*tango+sy*whiskey;
sx=nx;


//   time to check bailout!!!!!!    
bail= sx^2 + sy^2 +sz^2  

//  if bail > bailout, it's outside of the fractal!!#!@#!
//  if bail < bailout  &&  you've completed all of your iterations, it's inside!!!
//  if bail < bailout  &&   you still are iterating, you need to plug
//  these new values into the iteration loop

  Ok, you can click to enlarge the images.  I will put them up in pairs, first normal y and z, second y and z values switched (in the Mandy part).

  If you look carefully at the elephant valley ones below, you can see the increase in symmetry when you switch the y and z values.



Elephant valley side.  I should make bigger images so you can check out the symmetry better.  Will do so quickly, than change out these images.   CLICK TO ENLARGE



Here is the mandy version, elephant valley side, might as well put them up.  Note that the first one looks like it is simply rotated at first glance, but if you look closer you can see that the switched yz version has greater symmetry in many details!
« Last Edit: September 13, 2012, 09:45:16 PM by M Benesi » Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #48 on: September 13, 2012, 05:07:49 PM »

 grin you finished very soon - btw I will not convert because I am very busy. Sorry folks. A Beer Cup
Logged

No sweat, guardian of wisdom!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #49 on: September 14, 2012, 03:05:37 AM »

  Might be good.  Finding new things out.  Definitely switch the y and z portions of the Mandy part.  It creates a lot of symmetry, and makes it look a lot nicer (even in dives).

UPDATE:  Have an idea about mathematically streamlining the formula, hold off on working on it for a bit, Chebyshev cosines(atans) should cut a bunch of calculations out, at least for the n=2, which is the coolest anyways.  Also came up with a new way of doing the mag-xyz portion that may ultimately be better (or perhaps worse- I did do something similar in the past).  


 UPDATE2:  Ummm... yeah..  Formula rewrites complete.  Cut about 33% time from calculations- set it up for z^2 only, as this is the most interesting looking.  New rewrite really hits the jackpot on fractallyness, all over the place- did a rewrite of the Mxyz portion's mathematics (changed it around a bit) before translating it to simple algebra..  It must be about time for Bib to break out a movie.

  Figured out a way (well, resurrected an old trick of mine) to get approximate 2d Mset cross sections for xy and xz planes, but it does not look as good as another version of the fractal, so that's ultimately going to be tossed out, unless someone realllllly wants to have something akin to an Mset cross section in the Mandy/Mxyz version.

  Will get the new code up in a bit.  It might be easier to put into Mandelbulber- it's simple algebra, cut and paste, no commands...
« Last Edit: September 16, 2012, 04:36:24 AM by M Benesi » Logged

Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #50 on: September 16, 2012, 04:49:36 PM »

Looks like triplex.


This looks very cool.



Hmm, how does look julia sets and inside renders?



p.s.

Just a small sugestion. On an upload, please keep each formula seperate, and with variables with default values that would give the best result. Or maybe just hidde unused variables. Default M-box values result nothing, and there are too many changable variables most of which having no conection with mandelbox.
« Last Edit: September 16, 2012, 05:08:41 PM by Asdam » Logged

fractal catalisator
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #51 on: September 17, 2012, 08:38:40 AM »

  I'm not sure what you mean by "Mbox" values?  They aren't used in the formula, which is a couple posts above this post.  There aren't any weird variables in the above code (AFAIK) as I just wrote it for DarkBeam the other day.

  Julias?  Well.. they are all right I suppose.  I like the one form the most, nice variety, etc.  I haven't really messed around from the inside yet either.  Coding and mathing, if you know what I mean.

  Additionally, I did a clean up and rewrite of the ChaosPro formulas, uploaded to the ChaosPro.de database in the compiler\benesi directory.  Definitely should use my coloring formulas if you're using ChaosPro, or at least something similar to mine (I forget the default quaternion coloring formulas... it's been years).

  They are under the name "Mag xyz forms.cfm" on the ChaosPro website, and I'm attaching them to this post.

   Anyways, it's not too hard to comprehend if you are familiar with ChaosPro.  I cleaned up the formula, made it pretty basic, with 2 "fast" z^2 versions that default to what I think are the best settings.  

 
  Rename the file from   "XXXXX.txt"  to   "XXXXX.cfm"     in other words, change the file extension.  To do this, you might have to select folder properties so you can view and change file extensions, or maybe just right click the file and select properties, or whatever.  

  In your ChaosPro formulas directory, under compiler, make a directory called Benesi (if it isn't there already), and drop the file there.  If you need further instructions... there are a bunch of smart people around here.  cheesy

Updated formula so spokes setting is correct (and moved it to the bottom of the formula page so people don't mess with it too much)

Update2 fixed detail mode switch settings for z^3,5,7,9....  detail mode still not fixed for z^2 julias...

* Mag xyz forms.txt (31.08 KB - downloaded 180 times.)
« Last Edit: September 23, 2012, 05:44:36 AM by M Benesi » Logged

Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #52 on: September 17, 2012, 04:48:44 PM »

 I'm not sure what you mean by "Mbox" values?  They aren't used in the formula, which is a couple posts above this post.  There aren't any weird variables in the above code (AFAIK) as I just wrote it for DarkBeam the other day.

Additionally, I did a clean up and rewrite of the ChaosPro formulas, uploaded to the ChaosPro.de database in the compiler\benesi directory.  Definitely should use my coloring formulas if you're using ChaosPro, or at least something similar to mine (I forget the default quaternion coloring formulas... it's been years).

  They are under the name "Mag xyz forms.cfm" on the ChaosPro website, and I'm attaching them to this post.

   Anyways, it's not too hard to comprehend if you are familiar with ChaosPro.  I cleaned up the formula, made it pretty basic, with 2 "fast" z^2 versions that default to what I think are the best settings. 

  Rename the file from   "XXXXX.txt"  to   "XXXXX.cfm"     in other words, change the file extension.  To do this, you might have to select folder properties so you can view and change file extensions, or maybe just right click the file and select properties, or whatever. 

  In your ChaosPro formulas directory, under compiler, make a directory called Benesi (if it isn't there already), and drop the file there.  If you need further instructions... there are a bunch of smart people around here.  cheesy
I just wanted to convince you that some of your formulas could be a little more user fiendly;) Say when one loads your mandelbox, by defoult there is nothing, on changing variables one can got something, but there are so many variables, and most of them just don't influence mandelbox fractal, so this is like blind walk. But I haven't looked Chaos Pro database for some time, coz there is nothing much new.

 
Quote
Julias?  Well.. they are all right I suppose.  I like the one form the most, nice variety, etc.  I haven't really messed around from the inside yet either.  Coding and mathing, if you know what I mean.
I just hadn't read the whole thread, that there are half mandelbrot half julia sets. Just forget this.

Triplex formulas like mandelbulb allways have pretty boring inside renders. But some 3D brot fractals are very boring from outside, but are more complex when you zoom inside of them and flag inside render. Like this:

Or this:

This is pretty unnoticed feature of fractals. Maybe this formula have something interesting inside, maybe not.
Logged

fractal catalisator
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #53 on: September 17, 2012, 09:16:46 PM »

  You're totally off topic.  As to your off topic posts-  the variables allow you to do fun things with the fractals, but they are not for someone who isn't willing to experiment.  I've done a rewrite of that formula, and hopefully can overwrite the old version in the ChaosPro database.  In addition, I'll attach the new version to this post- try it out, lots of formulas and stuff eliminated.  I didn't remove all of the switches, instead moved them to the bottom of the formula tab, didn't feel like doing tons of work on it.  Stuff is set up so that you generally will have the correct settings, although you do need to change the scale and fold for various types.

 Note that ChaosPro sets the initial view position deep inside the Mbox.  I cannot control the beginning viewing position as far as I know... if you find out something in the documentation, then let me know in a NEW thread or a PM (well.. pm me if you start a thread).


  This thread is about something entirely different, so please stay on topic.  smiley  

* Copy of benesi set simplified.txt (209.46 KB - downloaded 126 times.)
« Last Edit: September 17, 2012, 09:20:57 PM by M Benesi » Logged

hgjf2
Fractal Phenom
******
Posts: 456


« Reply #54 on: September 19, 2012, 07:21:16 PM »

Curiosity:
I have anything the 3D fractals made in C#.
When giving the prizes at this competition "The 3D mandelbulb", that I want to participe?
 
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #55 on: September 20, 2012, 03:54:03 AM »

@hgjf2 -  Sorry, I don't entirely understand what you meant?

@Asdam -  Hey, tried inside.  I like the external view better.  It's interesting though, if you get the ChaosPro versions working.  It has similar features to the external view, just.. well... different.  Reminds me of other (Mbulb) interior renders.  Might have something to do with bailout settings- the lack of crispness on certain parts.  Something to think about.
« Last Edit: September 20, 2012, 07:44:37 AM by M Benesi » Logged

Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #56 on: September 23, 2012, 07:03:24 PM »

I just trying to convince to implement a bitt what would be user friendlyness in my opinion, as Chaos pro certainly don't have very much 3D content, but this software is pretty friendly with not very young PCs.

Probably I'm more interested in coding and new formulas. But with Benesi Orbital Coloring I experienced the same, if you start default quaternion (hybrid) and pick Benesi Orbital Coloring with a default factors (all =0) and default switches you get nothing. Here at fractalforums was some good pics of its use, but there are just too many switches and variables for try and error method. I can imagine that there is much more lame users than me, who just pick something, and if don't works they go to next.


Back to the topic.

Realy I think this fractal is one of the best new fractals I had seen here in fractalforums. It's orderly nature are much more visualy appealing than mass of mandelbulb and it have features expected for holly grail, such as all around repeating stalks. Well, I think "Holly Grail" alsou should be mathematical meaningfull what I just can't tell;)


Maybe this would have some use. I have simple code for cutouts in Chaos pro 3D. I put in bailout conditions additional variable autobailout. When pixel should be cut off autobailout = bailout +1; Maybe an unelegant, but it works.
Code:
// block for cutout.
parameter int iscuted;
parameter quaternion Ctaxis;
real autobailout, coordX, coordY, coordZ;

void init(void)
//block for cutout. An unelegant code.
autobailout=0;
coordX= real(Ctaxis);
coordY= imag(Ctaxis);
coordZ= part_j(Ctaxis);
if (iscuted == "Larger than")
{
if (coordX!=0 && real(pixel) > coordX )
{
autobailout= bailout +1;
}
if (coordY!=0 && imag(pixel) > coordY )
{
autobailout= bailout +1;
}
if (coordZ!=0 && part_j(pixel) > coordZ )
{
autobailout= bailout +1;
}
}
else if (iscuted == "Smaller than")
{
if (coordX!=0 && real(pixel) < coordX )
{
autobailout= bailout +1;
}
if (coordY!=0 && imag(pixel) < coordY )
{
autobailout= bailout +1;
}
if (coordZ!=0 && part_j(pixel) < coordZ )
{
autobailout= bailout +1;
}
}

bool bailout(void)
return( cabs(z) + autobailout < bailout );


void description(void)
//block for a cutout.
separator.label2.caption  = "CUTS along NONZERO coordinates.";
iscuted.caption="CUTTING";
iscuted.enum="None\nLarger than\nSmaller than";
iscuted.default= 0;

Ctaxis.caption ="Coordinates of cut";
Ctaxis.default= (0,0,0,0);
Ctaxis.visible = (iscuted=="Larger than" || iscuted=="Smaller than");
« Last Edit: September 23, 2012, 07:15:26 PM by Asdam » Logged

fractal catalisator
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #57 on: September 23, 2012, 08:22:32 PM »



The cutout code is perfectly logical.  It might be better if you had an option to do the absolute value of the pixel coordinates as well:  abs (real(pixel)) > coordX, etc...

  Still, without getting ahold of Martin, I'm thinking we might be unable to set the initial viewing position of fractals from within the formula-  the viewing position is set on the View tab. 

  As to the coloring formula- I'm doing a rewrite now, deleting a bit of extra code and options, cleaning up the interface, and trying to make it more user friendly.  Will attach it here, and post it to ChaosPro.de a bit later.

Logged

Alef
Fractal Supremo
*****
Posts: 1174



WWW
« Reply #58 on: September 23, 2012, 08:57:14 PM »

Thanks for taking notice:)
Logged

fractal catalisator
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #59 on: September 23, 2012, 09:49:31 PM »

  I fixed up the interface a little bit.

  The "Palette Mode" option is pretty cool- it lets you use the palettes in ChaosPro (you can design your own as well), which means you can change the colors without recalculating the fractal.  I've set it to default settings that work well with this particular fractal type.

  I prefer "RGB" lighting to the other type of lighting, makes the colors brighter.  Do what you like though.  

  Here is the formula- drop it into the formulas directory (or "Benesi" directory).  As always, you need to rename the file because I cannot upload the correct file extensions to FF.

  THIS ONE HAS A DIFFERENT FILE EXTENSION (ccl instead of cfm)!!!!   RENAME TO "benesi coloring.ccl"    

* Benesi Coloring.txt (13.58 KB - downloaded 143 times.)
« Last Edit: September 23, 2012, 09:51:48 PM by M Benesi » Logged

Pages: 1 2 3 [4] 5 6 ... 8   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Where does THE formula come from ? Mandelbrot & Julia Set bib 5 5296 Last post January 26, 2009, 07:12:10 PM
by cKleinhuis
Formula? Theory « 1 2 » lkmitch 20 9883 Last post March 23, 2010, 06:01:56 AM
by jehovajah
carved ivory revised Mandelbulb3D Gallery GrahamSym 0 997 Last post November 28, 2011, 11:31:31 AM
by GrahamSym
Alien Waters (revised) Mandelbulb3D Gallery Tahyon 0 766 Last post July 04, 2012, 07:36:28 AM
by Tahyon
@jesse - save formula as new formula ?! feature request cKleinhuis 0 5066 Last post October 10, 2012, 05:43:14 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.203 seconds with 26 queries. (Pretty URLs adds 0.018s, 2q)