Welcome to Fractal Forums

Fractal Math, Chaos Theory & Research => The 3D Mandelbulb => Topic started by: M Benesi on June 11, 2010, 02:18:53 AM




Title: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 11, 2010, 02:18:53 AM
  SMALLIFYING IMAGES SO THE REAL "REAL TRUE" 3D FORMULA CAN TAKE PRECEDENCE  it will be posted below in new post

  Works great hybridized with the Mandelbox, lots of interesting patterns, and for whatever reason it is smoother...

  It's a modification of my Type B1 formula.  Doesn't have the whispyness of the old "true mandy" formula, rather it is fractally and zoomable in many locations (although doing 20+ iterations takes a long time, so the higher z^n variations are still going to dominate my fractalling until I get a new computer).  

  Note that it uses different code for the z^3 version (posted at bottom of message).  Not sure about which code segment should be used for each one beyond z^3 (yet)...   The  even n z^n (2,4,6,8....) use the original code.  The odd n z^n (3,5,7,9....) use the new code.  I'm not sure where the flaw is (maybe accumulated errors, but I doubt it) but there is distortion in all versions.  We are using 2 x pixel additions and switching them to achieve balance (between the 2 magnitudes) which leads to accumulated errors as we iterate.

  Anyways, the main point being that the farther you get from the x-axis, the more distorted the fractal gets.  

  Here is my type B3 version of David Makin's minibrot (http://www.fractalforums.com/3d-fractal-generation/true-3d-mandlebrot-type-fractal/msg7346/#msg7346) which I think would have a lot more branches if I rendered it better (slower):
(http://lh6.ggpht.com/_gbC_B2NkUEo/TBGn8FnYXYI/AAAAAAAAAUs/CkIKEONnoWg/s400/davids%20mini%20bulb.jpg)

  Anyways, I posted the code in another thread, but figured I should post it here as well (was thinking about "Search for the holy grail" thread, but saw that jehovajah said it was getting a little too long, and as I just re-read the original 37 page thread, I wholeheartedly agree).  

  Here is the code, followed by a zoom (to be posted when done with render... about 1 hour and 50 minutes for a 24 iteration 800x800) into either the period 2 or 4 bulb (can't remember which- it is calculating now, maybe even a sub bulb of the 2 or 4):

  Including mathematical translations of code after actual ChaosPro code.  Consider thanking Martin Pfingstl for creating freeware software that allows people with limited resources to do mathematical exploration (and thank the Maxima team).

  Use z^2 version for even n (z^2,4,6,8....) and z^3 version for odd (in other words, z^2 code is z^even code and z^3 code is z^odd code)

Code:
  


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

theta=atan2(sx+flip(sy));    //  atan2 (in ChaosPro syntax) calculates the arctangent of real x plus imaginary y
tango=atan2(sx2+flip(sz));  //  flip (in ChaosPro syntax) multiplies a real value by [i]i[/i]  
                //  so the previous 2 statements calculate the angle between real x and imaginary y for the first angle "theta"
                //  and 'imaginary" z for the second angle "tango"

if (pixelr>0) { //  If the x value of the pixel is greater than zero, use the r3 radius for value nx (the one with the sx2 component)
nx=r3*cos(theta*v);   // this calculates our rotational component, just like in the regular Mandelbulbs you guys know
} else {    //  if the x value is 0 or less, use the r2 radius for value nx (the one with the sx component)
nx=r2*cos(theta*v);  //   in other words: nx = r2 * cosine (angle theta * v)  v is the rotations which is set = to n
}

if (pixelr>0) { //  If the x value of the pixel is greater than zero, use the r2 radius for value nx2 (the one with the sx component)
nx2=r2*cos(tango*v);
} else {   //  if the x value is 0 or less, use the r3 radius for value nx2 (the one with the sx2 component)
nx2=r3*cos(tango*v);
}

ny=r2*sin(theta*v);   //  these are pretty much standard, as are the rest
nz=r3*sin(tango*v);

 if (juliaMode) {   // just a standard if/else statement... if the boolean variable juliaMode is true use the perturbation variables
sx=nx+cr;      // cr is the real perturbation value
sx2=nx2+cr;   // cr is used for both x values
sy=ny+ci;      // ci is used for the y:  The c is pretty standard for fractals, the i is form imaginary
sz=nz+cj;      // cj is used for the z:  the j is used because it pretty much standard for quaternions, and I still use it for z axis
 } else {              // if you didn't set the boolean juliaMode=true (hitting the checkbox) you will do standard Mandelbrot addition
sx=nx+(pixelr);      // of pixel values..  once again use the real (x axis) pixel component for
sx2=nx2+(pixelr);   //  both x values
sy=ny+abs(pixeli);  //  the y axis pixel component
sz=nz+abs(pixelj);  //  the z axis pixel component
 }

 z=quaternion (sx,sy,sz,sx2);  //This statement feeds information to ChaosPro's orbital coloring scheme which allows you to use
  // orbital values of the variables at whatever iteration you pick to assign colors (picks them from a palette you set)

 bail=abs(sx)+abs(sy)+abs(sz)+abs(sx2);   //  and of course bail is the variable I send to the bailout check within ChaosPro
  //  I tend to set bail a bit high ~12-22 just because I do.  Probably eats a few more iterations... but I am not sure of the
 // exact value for 4 variables (8?  16?  12 seems to work... but so does 4... so... hrm...).


  Image will be posted later (1:10:xx left).
  Anyways, the image is crappy.  Just a bad zoom, so I picked out David's old minibrot (more or less) to do a render which should take about 45 minutes to an hour.  I also have a neat area of elephant valley (don't follow the axes, instead pick areas between them for maximum interesting fractallyness) getting done, but the coloring scheme is to show details (set to 3 iterations less than total and .1 speed, offset 55 gives nice details (where it is slightly lower it is dark) but it doesn't give good differences between the big areas.  I'll see if I can get it to show the big details too, but... my coloring scheme skills are severely lacking, just ask Trifox).  

  Here is the elephant valley, and I'll throw in a couple of ... crappy seahorse valley ones afterwords.  
(http://lh6.ggpht.com/_gbC_B2NkUEo/TBGdNyPRlKI/AAAAAAAAAUk/kKwB9teKE5k/s400/elephant%20valley%20twists%20redone%20a%20bit.jpg)

Seahorse (actually, now that I think about it, I wasn't in between the axes, which isn't as awesome for elephant valley, so... there you go, that's why they are boring):
(http://lh6.ggpht.com/_gbC_B2NkUEo/TBGc0Pp415I/AAAAAAAAAUU/wwLXqR1TC-E/s400/outskirts%20of%20seahorse%20%20valley.jpg)(http://lh3.ggpht.com/_gbC_B2NkUEo/TBGc0b90WGI/AAAAAAAAAUY/tGdjOugfbzA/s400/inner%20valley.jpg)

  then here is the period 4 bulb zoom (crappy render, should have picked a better angle/location):
(http://lh6.ggpht.com/_gbC_B2NkUEo/TBGc0AhQmnI/AAAAAAAAAUQ/fOkrqmhfpM4/s400/shitty%20render.jpg)


  Modified z^3 code segment (do an if statement, or whatever):
Code:
  QUICK NOTE:  z^3 uses a different setup than z^2 (to be like a z^3 2d Mandelbrot over both z and y axis):

if (pixelr>0) {
nx=-r2*cos(theta*v);
} else {
nx=-r2*cos(theta*v);
}
if (pixelr>0) {
nx2=-r3*cos(tango*v);
} else {
nx2=-r3*cos(tango*v);
}

ny=-r2*sin(theta*v);
nz=-r3*sin(tango*v);


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: KRAFTWERK on June 11, 2010, 08:40:27 AM
WOW, that looks really interesting M!

Lots of things going on at the "spikes" some nice minibrots there?


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: reesej2 on June 12, 2010, 10:21:46 AM
Definitely promising! Great work!


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: M Benesi on June 12, 2010, 10:57:54 PM
  Thanks!

    The formula is promising, but I've hit writer's block. I'm drawing blanks on how to balance the y-z drift.  I've tried a few things so far, but nothing really hits the spot. The grail is still just out of reach, ehh?

  @Kraftwerk:  Yeah, there are tons of little distorted mini-brots coming off the main body in ALL directions (besides the one in the above image), each with its own set of mini-brots coming off of it. 

  The fractals are also a bit squarish/spiky, which I've never really enjoyed (in fractals), as I prefer the smoother types.  I've got to check out how I corrected previous "spiky-brots" and apply it to this situation- might be as simple as a sign change, might be much more complicated.

  Anyways, here is the main z^2, rotated 45 degrees vertically so we can view the interesting parts (valleys, mountains and cliffs in the 3d thing we've got here).  

(http://lh3.ggpht.com/_gbC_B2NkUEo/TBPzDjRV9aI/AAAAAAAAAU0/m7M6HxsTf8E/45%20vertical%20rotation%20big.jpg)

  And a spiky grasshopper head from z^8 (needs another iteration):
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBP0nrYZh-I/AAAAAAAAAU8/3LpLfJiRD_k/spiky%20grasshopper%20head.jpg)


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: M Benesi on June 15, 2010, 09:09:26 AM
Well, I found a way to balance the whole thing out, ending up with something almost exactly the same as David's roundy 4d "true 3d" Mandelbrot.  It's not as pleasant, although it has (nearly... weirdness at higher iterations... maybe something, maybe nothing) perfect Mandelbrot's of all varieties upon rotation about the x axis.

  It just isn't very interesting.  Hrmm.. anyways, code follows, maybe an image tomorrow:

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

theta=atan2(sx+flip(sy));
tango=atan2(sx+flip(sz));
if ((sy+sz)<0) {     //  this statement really doesn't do anything noticeable... you can scratch it
whiskey=atan2(sx-flip(sqrt(sqr(sy)+sqr(sz))));
} else {
whiskey=atan2(sx+flip(sqrt(sqr(sy)+sqr(sz))));
}

nx=r2*cos(whiskey*v);
ny=r2*sin(theta*v);
nz=r2*sin(tango*v);

if (juliaMode) {
  sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
} else {
sx=nx+(pixelr);
sy=ny+(pixeli);
sz=nz+(pixelj);
}
z=quaternion (sx,sy,sz,0);
bail=abs(sx)+abs(sy)+abs(sz);


  It allows exploration of higher order fractals (I think this formula is a repeat of another from the past... can't recall however), although they aren't that exciting...


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: miner49er on June 15, 2010, 05:30:08 PM
Is this the 'Real McCoy'?

I would love to see the Z^2 + C one rotating around the X/Y/Z axis...hint hint


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: M Benesi on June 15, 2010, 09:14:37 PM
  Right now I am rendering a couple z^2 amazing hybrid B4 (amazing hybrids are fractal types blended with Tom Lowe's "amazing fractal" Mandelbox).  As this formula is type b4... I might post the images in this thread as well as in the images part of the forum.

  As to a rotation animation, maybe later.  Type B4 (not the first formula I posted in the thread, the newest formula above your post) looks almost EXACTLY like David Makin's "roundy true 3d" '4d' Mandelbrot, of which there is a quick animation of a minibrot he posted in the original "true 3d mandelbrot" thread here (http://www.fractalforums.com/index.php?topic=742.msg7325#msg7325).

  Below are a few quick images comparing type B4 and Type B3d (b3d is more interesting, B4 has "perfect" Mandelbrot slices where y and z equal 0 due to its formula).  Also, type b3d uses one less iteration for more detail.

front face (b4 then b3d):
(http://lh4.ggpht.com/_gbC_B2NkUEo/TBfPIsVqvgI/AAAAAAAAAWs/uXcBuvyL8-E/front%20face.jpg)(http://lh4.ggpht.com/_gbC_B2NkUEo/TBfPi-5xpAI/AAAAAAAAAXA/4SaJpK8i6ho/type%20b3d%20comparison%20front%20face.jpg)
45 degrees towards rear from side view (b4 then b3d):
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBfPI72yUSI/AAAAAAAAAWw/ejbULqQpxjw/rear%20n45%20rotation.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TBfPjOeKW2I/AAAAAAAAAXE/p-_Y3kcgrNY/type%20B3d%20comparison%20rear%20n45%20rotation.jpg)
rear (b4 then b3d):
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBfPJH8DhYI/AAAAAAAAAW0/UtejVqy7oUc/rear%20shot.jpg)(http://lh5.ggpht.com/_gbC_B2NkUEo/TBfPjP8hYvI/AAAAAAAAAXI/tC-R3bzTS2w/type%20b3d%20comparison%20rear%20shot.jpg)
front face 45 degrees towards side view (b4 then b3d):
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBfPJG4xGyI/AAAAAAAAAW4/MmunB2vj5hY/rotated%20n45.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TBfPjCyO28I/AAAAAAAAAXM/46JG36CSyFU/type%20b3d%20comparison%20rotated%20n45.jpg)
side view (b4 then b3d):
(http://lh4.ggpht.com/_gbC_B2NkUEo/TBfPJcL3HiI/AAAAAAAAAW8/9j7UsOhItsw/straight%20on%20shot.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TBfPjSgt5sI/AAAAAAAAAXQ/ABgyRLHZCJk/type%20b3d%20comparison%20straight%20on.jpg)


Title: Re: True 3d Mandelbrot finally... not really, distorted
Post by: KRAFTWERK on June 16, 2010, 08:58:21 AM
Interesting and beautiful images! I love the coloring of these latest renders M!


Title: Re: The Real "Real True" 3d Mandelbrot finally...
Post by: M Benesi on June 17, 2010, 08:59:33 PM
  Thanks Kraftwerk.

   Ok, this could be the real formula.  It demonstrates interesting properties, and I know it's the real formula because I cut cross sections of it, it is amazingly fractal, and it's just awesome.  It only is "perfectly" cross sectional Mandelbrot's at z^5,9,13....  every forth n.  This is similar to a regular Mandelbrot, which is only perfectly symmetric over the y axis every other z^n (z^3,z^5,z^7....).  

  The fractal is only perfectly symmetric over both the z and y axes every 4th n.  It is symmetric over z and over y respectively every 2nd n (z^3,z^5,z^7...) but it only has symmetry over both axes at once (all around) every 4th n (z^5,z^9...).  I suppose it's logical that the 3 dimensional version would only have perfect symmetry every 4 instead of 2 n's.  Perhaps the 4d version will only be symmetric every 8 n, or maybe each additional dimension squares the number behind it (I'd tend to think it only multiplies by 2 each time, but haven't expanded to 4d yet).  

  It's a type I fractal (since M Benesi wrote it, you can call it a type I M Benesi fractal, if you want), with sumode and rXmodec checked.  I'll post the simplified code in this thread (without all of the check box options: just the streamlined type I M Benesi 3d Mandelbrot fractal).

Code:
r2=(sqr(sx)+sqr(sy2)+sqr(sz2))^(n/2);

theta=atan2(sx+flip(sy));
whiskey=atan2(sx+flip(sz));
tango=atan2(sx+flip(sqrt(sy2^2+sz2^2)));
foxtrot=atan2(sy2+flip(sz2));

nx=r2*cos(tango*v);
ny=r2*sin(theta*v);
nz=r2*sin(whiskey*v);
ny2=r2*cos(foxtrot*v)*sin(tango*v);
nz2=r2*sin(foxtrot*v)*sin(tango*v);

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
sy2=ny2+ci;
sz2=nz2+cj;
} else {
sx=nx+(pixelr);
sy=ny+abs(pixeli);
sz=nz+(pixelj);
sy2=ny2+abs(pixeli);
sz2=nz2+(pixelj);
}

bail=abs(sx)+abs(sy)+abs(sz);
z=quaternion(sx,sy,sz,0);   // just for ChaosPro orbital coloring scheme

  The coloring is different for images due to orbital coloring scheme (components of color are assigned by which value is which, look at the z= quaternion (sx,sy,sz,0) statement, if you switch axes, you will switch which proportion is where in your orbital sampling... anyways).  

  Here are some boring, straight on, z^5 slices (that look exactly like a z^5 2d Mandelbrot).  They are the same over all axes.  
looking down (towards negative) y axis:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBpvX-_LiDI/AAAAAAAAAZ0/7ciNifsyDXM/facing%20neg%20y.jpg)
looking down the z:
(http://lh4.ggpht.com/_gbC_B2NkUEo/TBpvX7ry9jI/AAAAAAAAAZ4/HOnluBxxAgk/facing%20neg%20z.jpg)
lookin' down x:
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBpvX-apIzI/AAAAAAAAAZ8/4YO9VzdmxEE/facing%20towards%20negative%20x.jpg)

  Anyways... the fractals are amazing.  


Title: Re: The Real "Real True" 3d Mandelbrot finally... Yup, got it
Post by: kram1032 on June 17, 2010, 10:57:11 PM
beautiful :D


Title: Re: The Real "Real True" 3d Mandelbrot finally... Yup, got it
Post by: twinbee on June 18, 2010, 12:05:38 AM
Hi Matthew, Those are some stunning pictures you have (see this thread (http://www.fractalforums.com/images-showcase-(rate-my-fractal)/ghost-lord/)), but as you have already hinted, it's almost certainly not the holy grail. There are still many whipped cream sections which have areas 'stretched out', and the variety is great, but I'm sure the real thing would be even more mind-blowing than we can imagine.

As you may now know, just because each 2D cross section looks promising, that doesn't necessarily indicate it's the grail. I would still expect spheres to surround spheres for the real thing.


Title: Re: The Real "Real True" 3d Mandelbrot finally... Yup, got it
Post by: M Benesi on June 18, 2010, 01:45:41 AM
  Thanks Kram1032!

  @Twinbee:

   I expect there to be locations in which the 3 variables (x, y, and z) cancel one another out in 3+ dimensional rotation based fractal (it's not simply the play of one variable against another, when you have 3 variables, perhaps one can cancel the effects of the other 2 out), but this isn't necessarily the reason for the smooth sections.  To address the stretchy sections: sometimes one variable can have a greater angular effect then another (x vs y is a greater angle than x vs z) so this results in a stretching of the pattern in the direction of greater (or maybe lesser) angular magnitude.  

As to the "smooth sections" indicating it's not a Mandelbrot, smooth sections are not evidence against Mandelbrot type fractals for a very very simple and demonstrable reason:

  The fractal was only 8 iterations (this isn't the reason, it's simply part of the reason for some of the larger smoother sections).

  Let's look at an 8 iteration 5th order 2d mandelbrot:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBqr0F-aXTI/AAAAAAAAAak/O79a2NStJT4/5th%20order%20flat%208%20iterations.jpg)
Then a zoom into its 2d smooth section:
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBqrE60NCKI/AAAAAAAAAaQ/OGtBOhUgyl0/5th%20order%20flat%208%20iterations%20zoomed.jpg)
increase of iterations (9 instead of 8 ):
(http://lh4.ggpht.com/_gbC_B2NkUEo/TBqs97pGEWI/AAAAAAAAAas/BwoPIkjrhDY/5th%20order%20flat%209%20iterations%20zoomed.jpg)
Still has smooth sections... Increase to 12 iterations:
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBqs-CIodnI/AAAAAAAAAaw/Vr_TGiIAQOc/5th%20order%20flat%2012%20iterations%20zoomed.jpg)
Still smooth sections... Increase to 16 iterations:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBqs-IFimcI/AAAAAAAAAa0/5O2IHNIRbPE/5th%20order%20flat%2016%20iterations%20zoomed.jpg)

  The smooth sections are pretty much a 2d version of whipped cream.  Probably indicates that the 2d Mandelbrot set isn't the "Real 2d Mandelbrot" set after all, ehh?  :p  

  Anyways, if you increase iterations (of a smooth section), it get's smaller (like in a 2d Mandelbrot set):

this one was 5 or 6 iterations (5th order):
(http://lh5.ggpht.com/_gbC_B2NkUEo/TBqrFImuZnI/AAAAAAAAAaY/iJZ1ik_RoU0/cancelation%202.jpg)
this is the same location with an iteration increase of 1:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TBqrFbKesjI/AAAAAAAAAac/KxKO7ANJqmI/cancelation%203%20plus%20one%20iter.jpg)
another iteration increase:
(http://lh3.ggpht.com/_gbC_B2NkUEo/TBqv4oAClOI/AAAAAAAAAbA/06iMQRZCrqs/cancelation%203%20plus%202%20iter.jpg)

  You can keep on zooming into the smooth section.  If you increase iterations until it is no longer smooth, the cure for its lack of smoothness is to zoom into it more until it is smooth again (try this with a 2d Mandelbrot).  Not all sections of the 3d Mandelbrot become chaotic at the same rate.  Shockingly, the 2d Mandelbrot displays exactly the same trait: not all sections of the 2d Mandelbrot become chaotic at the same rate).  

  As to your last statement about spheres to surround spheres for the real thing, I don't agree, simply because this is the real thing.  But if it really needs spheres to surround spheres (whatever that means), that's the Amazing Hybrid I z^9.  A bunch of golf balls, surrounding spheres made of golf balls.  Pretty hilarious looking actually:

(http://lh3.ggpht.com/_gbC_B2NkUEo/TBqzVs5aEzI/AAAAAAAAAbc/-LkOOzssPYs/ballllz.jpg)(http://lh6.ggpht.com/_gbC_B2NkUEo/TBqzVxSQccI/AAAAAAAAAbg/hq92sAJ1vMg/ball%20zooom.jpg)(http://lh5.ggpht.com/_gbC_B2NkUEo/TBqzVyzj8UI/AAAAAAAAAbk/p5bGJWIolOg/happy%20funtime%20ballz.jpg)

  However, in light of your comments as to the truthiness of the truthiest 3d Mandelbrot, the fractal and I (type I I, not fractal type I, although the fractal is fractal type I) have decided to give you your very own section of the z^4. (http://www.fractalforums.com/index.php?topic=3411.msg18398#msg18398)


Title: Re: The Real "Real True" 3d Mandelbrot finally... Yup, got it
Post by: pseudogenius on June 18, 2010, 07:09:49 AM
Whoa, closest z^2 to the grail yet!   :)

But, I cannot accept that this is the real thing  :sad1:
Not just because of personal expectations, but because of the following things that many people,including me, think the all 3d mandel should have. Some have mathematical basis also.

1. Symmetric about xy and yz plane. :)
2. Most of the set must be bounded by cardioid revolved around the x axis   :sad1:
3. The head must be a near sphere, and the main body and head must be covered by near spheres of varying sizes.   :sad1:

I was really hoping someone had found it.  :'(

There still might be something out there. All these types of near grails might have something in common. This seems harder than unifying quantum mechanics and relativity.  :dink:

Still, great job M Benesi. You're fractal is amazing!  :)




Title: Re: The Real "Real True" 3d Mandelbrot finally... maybe
Post by: M Benesi on June 18, 2010, 07:32:36 AM
  Update: hilarity has ensued.  I fixed the distortion of the Mandelbulb.  Guess what you do?  Take the absolute value of the y pixel component when adding it in.  That's what this fractal is.
Code:
r2=(sx^2+sy^2+sz^2)^(n/2);
theta=atan2(sx+flip(sqrt(sz^2+sy^2)));
phi=atan2(sy+flip(sz));

nx=r2*cos(v*theta);
ny=r2*sin(v*theta)*cos(v*phi);
nz=r2*sin(v*theta)*sin(v*phi);


if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
} else {
sx=nx+(pixelr);
sy=ny+abs(pixeli);
sz=nz+(pixelj);
}
z=quaternion(sx,sy,sz,0);
bail=sx^2+sy^2+sz^2;

  All the unnecessary code is extraneous.  And hilarious.  :D  Which means the Mandelbulb is realllllly freakin close.  Just an absolute value off, a sign change to make it totally Mandelbroty.... hahahaha  hahahaha, I've been taking the absolute value of the y component for so long (at least a week or 2... actually a lot longer, maybe) that I didn't even think of applying it directly to the Mandelbulb....


  It's pretty hilarious now that I glanced at the code.  It became so convoluted (as I added switches) I didn't notice that I basically use the Mandelbulb formula with sy2 and sz2, then use the bailout from sy and sz, which are calculated against the sx portion of the Mandelbulb code.  I was trying to find a way to balance all 3 variables, and that was one way to do it (that produced Mandelbrot type patterns).

  Not that you are definitely wrong, but I don't think that artistic expectations (spherical cardioid, etc.) have foundation in anything other than imagination, artistic fantasy imagination at that.  The simple fact is that with the 3d Mandelbrot (as opposed to a 2d), you have a more complex interaction between the variables (not only do you have x vs y, you have y vs z and x vs z, all 3 interactions effecting one another, which means you will only get patterns matching the simple 2d formula on the axes).  

 Here's a quick z^5 julia to check out:
(http://lh4.ggpht.com/_gbC_B2NkUEo/TBsFYOYEEMI/AAAAAAAAAdA/H2rmAyAKglE/5th%20order%20julia.jpg)


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: kram1032 on June 18, 2010, 11:59:22 AM
pseudogenius: Don't forget that the Mbulb images up there have a rather low iteration count.
I've seen superhigh iterated 2nd order Mbulbs before and they usually turned out to look a lot more spherical. It's just that the additional detail from the spikes and such gets so dustlike that it nearly looks smooth. ;)

So we'll have to see a highly iterated version of it to know what the behaviour is around the caridote and the main circle/sphere...


Title: Re: The Real "Real True" 3d Mandelbrot finally... maybe
Post by: Softology on June 20, 2010, 03:26:44 AM
Code:
theta=atan2(sx+flip(sqrt(sz^2+sy^2)));
phi=atan2(sy+flip(sz));

I wanted to give these a go, but I need a tip for the atan2 and flip parts of the above quoted code.

Normally arctan2 takes 2 varialbles (y,x).  How does chaospro handle atan2?  How would I modify atan2 into the usual arctan2 syntax?

Also what does flip do?  How would that be implemented as a non chaospro procedure/function?

Thanks,
Jason.


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: Buddhi on June 20, 2010, 09:06:38 AM
Code:
theta=atan2(sx+flip(sqrt(sz^2+sy^2)));
phi=atan2(sy+flip(sz));
I wanted to give these a go, but I need a tip for the atan2 and flip parts of the above quoted code.
Normally arctan2 takes 2 varialbles (y,x).  How does chaospro handle atan2?  How would I modify atan2 into the usual arctan2 syntax?
Also what does flip do?  How would that be implemented as a non chaospro procedure/function?

flip(x) produces imaginary part of complex number. It means:
Code:
flip(x) = 0 + ix
atan2(x + flip(y)) you should convert to arctan2(y,z) because:
Code:
atan2(x + flip(y)) = atan2(x + iy) = arctan2(y,x)

Finally you have:
Code:
theta = arctan2(sqrt(sz^2+sy^2),sx)
phi = arctan2(sz,sy)

Please correct me if I'm wrong


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: twinbee on June 20, 2010, 07:41:17 PM
Quote
The smooth sections are pretty much a 2d version of whipped cream.  Probably indicates that the 2d Mandelbrot set isn't the "Real 2d Mandelbrot" set after all, ehh?  :p 

I've spoken in the past about the very thing you've mentioned, but the thing is: with the 2D Mandelbrot, these 'smooth' sections disintegrate with further iterations (as I'm sure you know). However, with your new 3D bulb algorithm, the smoothness never goes no matter how iterations you use (or at least, it goes in one or two dimensions, but not the others, which would cause a 'stretched' look (as seems to be evident here)).

It's hard to imagine the real thing, but I am expecting a much more crystalline look to the texture, and very unusual intricate 3D whirlpool or spiral staircase sections with mini spiral staircases hanging off. Other sections would look very maze-like with and/or foamy, but good-foamy with stunning variety. Like I said, barely imaginable, but you won't mistake it when you see it.

I really like the golf-ball shots though.


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 20, 2010, 07:46:24 PM
Finally you have:
Code:
theta = arctan2(sqrt(sz^2+sy^2),sx)
phi = arctan2(sz,sy)

Please correct me if I'm wrong


  Your statement is correct.  :D 


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 20, 2010, 08:28:08 PM
I've spoken in the past about the very thing you've mentioned, but the thing is: with the 2D Mandelbrot, these 'smooth' sections disintegrate with further iterations (as I'm sure you know). However, with your new 3D bulb algorithm, the smoothness never goes no matter how iterations you use (or at least, it goes in one or two dimensions, but not the others, which would cause a 'stretched' look (as seems to be evident here)).

  Hi twinbee.  I'm not entirely sure what you're getting at.  As you increase iterations, the smooth sections become smaller, just like in a normal 2d mandelbrot.  If you zoom into them, they are still smooth (just like 2d Mandelbrots).

  Here is a quick image of a 2d z^3 zoom, with different colors for each iteration (purple=50, blue-green=49, orange=48, white=47, pinkish beige=46), you can see the complexity increase as iterations increase.  However, the smooth sections always remain (although if you zoomed out from this image, it would appear to lack smoothness, but it would still have the smooth sections).

(http://lh6.ggpht.com/_gbC_B2NkUEo/TB5WVkvdl_I/AAAAAAAAAdQ/mRQ2wKzs7lM/quick%20demo%202d%20mandy.jpg)

  For 3d Mandelbrots, we don't usually iterate way past the point of smoothness, because when we do we end up with a chaotic hairy mess (in the more complex parts).  The only way to avoid any smooth sections would be to combine fractals with differing total iterations into one image (I think some people have been doing this, but I haven't).

It's hard to imagine the real thing, but I am expecting a much more crystalline look to the texture, and very unusual intricate 3D whirlpool or spiral staircase sections with mini spiral staircases hanging off. Other sections would look very maze-like with and/or foamy, but good-foamy with stunning variety. Like I said, barely imaginable, but you won't mistake it when you see it.
  You mean like this:
(http://lh4.ggpht.com/_gbC_B2NkUEo/TB5dEeLcUvI/AAAAAAAAAdc/A5zf__mfYq4/quick%20zoom%2013%20iter.jpg)
Quote
I really like the golf-ball shots though.
  Yeah, they look pretty hilarious.  Almost as funny as writing an excessively complex formula and ending up with a simple variation of another formula. 


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 21, 2010, 03:29:18 AM
  All right, I've been working on the math, writing out the formulas algebraically to see why certain z^n work and others don't.  

  I'm using the atan2 (x+i*y) format to avoid confusing anyone with division by zero...  Like Buddhi said, atan2 (x + iy) = arctan (y/x), the main difference being it avoids potential division by zero errors/confusion, which is why it is sometimes preferential to use this syntax.

  cos (atan2 (x+ i*y) * 2) = -1 when x=0  and  1 when y=0
  sin  (atan2 (x+ i*y) *2) = 0 when x or y = 0

  cos (atan2 (x+ iy) * 3) = 0 when x= 0 and 1 when y=0
  sin (atan2 (x+ iy) * 3) = -1 when x= 0 and 0 when y=0   (this is the first n that has symmetry: but not perfect symmetry like z^5)

  I think we can correct the lack of symmetry with a simple -1 multiplier.... we will see.

  cos (atan2 (x+iy) *4 )  (didn't do the math yet, isn't symmetric anyways)

  cos (atan2 (x+iy) *5 )  =0 when x=0  and  1 when y=0     (This is the first all around perfect symmetry)
  sin (atan2 (x+iy) *5 )  =1 when x=0  and 0 when y=0      


  Now the idea I am messing with now is not a solution for the irregularity of the even n z^n, but it may extend the regularity of the odd n z^n.  I am going to multiply the cosine variables by -1 and see what happens for z^3 (well, I already did it with 1 cosine variable (sx vs i* sqrt(y^2+z^2), and it is interesting, I just sometimes get caught up in writing out random BS to amuse myself....).

  Here is an image of the z^3 with the one -1 multiplier to the cosine:
 (http://lh3.ggpht.com/_gbC_B2NkUEo/TB6_0gL651I/AAAAAAAAAdk/b52BMaPh_YQ/bulb%20n1%20to%20sx%20cosine.jpg)

  When I multiply both cosines by -1, I get large smooth areas that are along the lines of what twinbee mentioned, but it might be due to negative absolute value pixel assignments... I'll check it out.

  Anyways, I made an all cosine version to try out with z^3... etc.  It has effects on z^3... but interestingly enough, has absolutely no effect on z^5s..  With the all cosine version, I multiplied the sx and sy values by -1 and came up with this interesting twisty variety (for z^3) that has large smooth areas in addition to awesome fractally areas.  I don't think it's necessary to use the all cosine version (I think I replicated it with the regular version multiplying the sy and sz values by -1, or something like that, but I forget and don't feel like checking at the moment). 

(http://lh3.ggpht.com/_gbC_B2NkUEo/TB7rTHikRmI/AAAAAAAAAeA/Eoj_Q7dd1aU/swirl%20wierd%20mode%20n%20n%20p.jpg)


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: twinbee on June 22, 2010, 03:42:25 PM
Quote
If you zoom into them, they are still smooth (just like 2d Mandelbrots).

I mean though if you don't zoom in. As you increase iterations even in your new formula, there are parts which remain smooth, unlike the standard 2D Mandelbrot.

Quote
You mean like this:

Not really no. The closest I've ever found to what I'm envisaging would be something like this Quasi-fuchsian fractal:

(http://www.skytopia.com/project/fractal/fuchsian2.png)

For example, in one of your latest picture, there are stretched areas that will never become unstretched, no matter how many iterations you use (and even if you don't zoom in). The detail will become more strand-like, but at least one of the dimensions will be whipped cream, like the quaternion fractals. See below for details:


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 22, 2010, 09:27:08 PM
  Edited to add: The quasi fuchsian fractal has blank circular areas... doesn't it?  Anyways...

  I see what you mean!!  just got it (after writing out a reply which addressed something else).  I thought you were talking about the "distortion" of the basic pattern....

  In 3d rotation based fractals you will have areas in which the angular magnitudes (angle of x vs y, angle of x vs z, and angle of y vs. z) mute or negate the effects of one another, which results in non-detailed "stretched areas" (lines, or 3d strands) and non-detailed "blank" spots instead of fractally interactions.  If you keep zooming perfectly into the exact location of the stretched area, you won't ever hit fractallyness, but perhaps if you veer to the side a bit you will leave the zone of angular cancelation (zoom enough and high enough iterations).  

  Working on a really deep zoom into one of your stretches.  I went onto a strand in between an outer strand and an inner strand.  Details did not start to emerge until ~23+ iterations.  

  Here is a 26 iteration, 8x z resolution, small shot (takes too long to make a big one):
(http://lh3.ggpht.com/_gbC_B2NkUEo/TCES6h3j9II/AAAAAAAAAes/4Ab-ARVaQy8/demo%20for%20twinbee.jpg)

  Just keep on zooming into a stretch (veer off to the side a bit to avoid the area of perfect angular cancelation, which is "wide" until you get to sufficient iterations) and you will find details.  Note that doing tons of iterations (20+ to me) takes a long time, the 444x444 image took 4 minutes on my 2 gig core 2 duo.... but you might have a better CPU, or a modern GPU.

  Wow, I am deep zooming into a strand (stretched area) right now, and it took 36 iterations (very deep) before it started showing details.  What I am wondering is.. in about 10 years when we can real-time deep zoom 100s of iterations... will the "stretched areas" have the most interesting emergent patterns?  

  Here is the strand at 38 iterations, with the fractal details emerging from between strands (still not high enough iteration or resolution, but it took ~9+ minutes to calculate this small image):
(http://lh5.ggpht.com/_gbC_B2NkUEo/TCEcRE5DDGI/AAAAAAAAAfI/Z3Y_GOM0ZmM/38%20iteration%20deep%20zoom%20strand.jpg)


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: jehovajah on June 23, 2010, 04:21:31 AM
Some really cool work matt. 

If anybody is going to get close to designer mandelbulbs it might as well be you.  ;D

There is a difference between our imagination and our implementation, and the same formula produces an infinite variety of outcomes depending on how it is implemented. For example i found that if i used arcsin() to find the angles as opposed to arctan() i got different mandelbulbs. I explored all the variations out there and realised that the mandelbulb is a product of our implementation of the formula. So try r^2(cos(2ø)+i sin(2ø))+c for different ways of obtaining ø to see what i mean.

Good luck and good fortune and keep up the excellent analysis.


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 23, 2010, 05:12:41 AM
  Thanks jehovajah,

  I actually have tried a bunch of variations over time.  While in this thread I started thinking about the implications of various angular multiples, and realized that only with a multiple of (4n + 1) * the angle do we end up back at the original angle, at least for pi/4 (90 degrees), which is the reason that only z^5,9,13.... Bulbs are completely symmetric over all axes.  

  Basically, for Mandelbulbs (3d Mandelbrot) with standard trig we aren't going to be able to maintain symmetry over (2n+1) * the angle as we can with 2d Mandelbrots, so the idea is to write non-standard trig functions (or perhaps algebraic formulas) for the various z^n.  

  I'll be back later with more thoughts on this...

  But first, before thoughts on "non-standard trig", what about a programmer's take on "standard trig"?  (it works)

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

theta=atan2(sx+flip(sqrt(sqr(sy)+sqr(sz))));


phi=atan2(abs(sy)+flip(abs(sz)));
  or
phi=atan2 (sy+flip(sz));  // makes nice images as well... I suppose it's the absolute value of the pixel components?

   nx=r2*cos(theta*v);
ny=r2*sin(theta*v)*cos(phi*v);
nz=r2*sin(theta*v)*sin(phi*v);

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
} else {
sx=nx+(pixelr);
sy=ny+abs(pixeli);  // absolute value is your friend
sz=nz+abs(pixelj);  //
}
z=quaternion(sx,sy,sz,0);
bail=sx^2+sy^2+sz^2;

  Interesting patterns produced, but still.. hrmm.  The z^2 now has interesting twists appearing in elephant valley:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TCGq5PS3z3I/AAAAAAAAAfQ/dkFmmVgYsgs/elephant%20valley%20end%20straight%20on%20view.jpg)

  Not to mention seahorse valley:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TCG8nb6TsAI/AAAAAAAAAfg/F3OvFitrrYI/neat%20seahorse%20shot.jpg)
or some other z^2, like this zoom of the top (looking down the z axis, I zoomed to one side a bit)
(http://lh6.ggpht.com/_gbC_B2NkUEo/TCG8nVdb1fI/AAAAAAAAAfk/eOjAc9XokZw/top%20zoom.jpg)
the above, zoomed a bit more, towards the top side of the x-axis:
(http://lh3.ggpht.com/_gbC_B2NkUEo/TCG8n4mGcaI/AAAAAAAAAfo/uAgiRI1PRi0/zoom%20into%20top%20zoom.jpg)
and  this random zoom into the front part of the fractal (the - x axis side is what I consider the "front")
(http://lh5.ggpht.com/_gbC_B2NkUEo/TCG8nAi3V5I/AAAAAAAAAfc/VBeth0RJaDg/front%20zoom.jpg)
or a better, more seahorse valley like location:
(http://lh6.ggpht.com/_gbC_B2NkUEo/TCHGBPOUGGI/AAAAAAAAAfw/KmCwVUkbILM/zoom%20towards%20seahorse%20side.jpg)
And a quick shot of a bit of z^3 weirdness:
(http://lh5.ggpht.com/_gbC_B2NkUEo/TCG8nKDXJwI/AAAAAAAAAfY/aXTU4bMnUIM/complex.jpg)


Title: Re: It's a Mandelbulb with absolute value of y pixel component... cut out the xtra
Post by: M Benesi on June 24, 2010, 06:57:07 AM
  I extended it up to 4d.  Works like a charm.  Except when you don't take the absolute value of the y component (in angular calculations) it doesn't look as pleasing (at least for the 4d Snakehead fountain area).  Haven't implemented absolute values into the following complex triplex codes... but they are faster, and probably "correct".

Here is the updated complex triplex (faster) 3d code, followed by the 4d code.  
3d code:
Code:
	r1=sqrt(sqr(sy)+sqr(sz));
r3=r1^(-n);   // take it to the -n so you don't have to divide by r3, as it can equal zero for the first iteration

victor=complex(sx,r1);
bravo=complex(sy,sz);  
victor=victor^n;    // for higher powers, set up a script if n= integer powers for each n so
bravo=bravo^n;   //  for  n=4   bravo^4 = sqr(sqr(bravo))     ||   for n=6 bravo^6 = sqr(bravo)*sqr(sqr(bravo))

nx=real(victor);
ny=imag(victor)*real(bravo)*r3;  // since r3=r1^-n you don't have to divide here.. good if r3=0
nz=imag(victor)*imag(bravo)*r3;

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
} else {
sx=nx+(pixelr);
sy=ny+(pixeli);  // take the abs(pixeli) for a more uniform fractal, although the distortion of the even n
sz=nz+(pixelj); //  z^2,4,6....  is to be expected considering the asymmetry of the 2d set for even n
}
z=quaternion(sx,sy,sz,0);  //this is not part of the calculation, it just feeds information to ChaosPro's orbital color scheme
bail=abs(sx)+abs(sy)+abs(sz);
 
4d code (see comments in 3d code for explanations/improvements that can be made):
Code:
	r1=sqrt(sqr(sy)+sqr(sz)+sqr(sk));
r2=sqrt(sqr(sz)+sqr(sk));
r3=r1^(-n);
r4=r2^(-n);

victor=complex(sx,r1);
bravo=complex(sy,r2);
cramden=complex(sz,sk);
victor=victor^n;
bravo=bravo^n;
cramden=cramden^n;

nx=part_r(victor);
ny=part_i(victor)*part_r(bravo)*r3;
nz=part_i(victor)*part_i(bravo)*r3*part_r(cramden)*r4;
nk=part_i(victor)*part_i(bravo)*r3*part_i(cramden)*r4;

if (juliaMode) {
sx=nx+cr;
sy=ny+ci;
sz=nz+cj;
sk=nk+ck;
} else {
sx=nx+(pixelr);
sy=ny+abs(pixeli);
sz=nz+abs(pixelj);
sk=nk+abs(pixelk);
}
z=quaternion(sx,sy,sz,sk);
bail=abs(sx)+abs(sy)+abs(sz)+abs(sk);


Title: now it's complex triplexes.....
Post by: M Benesi on June 25, 2010, 08:16:51 AM
  A few images, after a few comments.

  Basically, I think I might have been thinking about triplex (and complex) numbers a bit backwards: or maybe I didn't really think about them in a direction at all.  

  I've been multiplying cosines and sines by magnitudes, thinking that this took them into the realm of complex (and triplex) numbers.  But really, when I wrote the complex triplex formulas (posted above), I started thinking that maybe this way of looking at it is backwards.  

  When you take victor:

  victor =  x + i * sqrt( y^2 + z^2)

  to the nth power, then take bravo:

  bravo = y + i * z

  to the nth power, and grab the components out of them to create new x, y and z values, you don't want to apply the magnitude of the y and z components twice, which you would be doing if you multiplied the components of bravo^n by the imaginary part of victor^n (which already has been effected by the magnitude^n (n times)) without dividing out the magnitude n times.

  The magnitude has to be divided out once for each time it would be double applied (for the y and z components), which I do in the above formulas.  So the whole thing of ending up with a sin and a cosine times the magnitude of all 3 variables is actually the elimination of the 2nd set of magnitudes of y and z when we extend complex numbers to higher powers.  

  Anyways, here is a neat glacial looking z^2 thing I did by taking the 4d formula and setting:
sx=nx+sx;
sy=ny+pixelr;
sz=nz+abs(pixeli);
sk=nk+pixelj;

  for the 4 variables.  It ends up being a wickedly complex fractal for odd n z^n (5, 9, 13... are the best).  In fact z^9 is unbelievably awesome to zoom into, although the even n z^n are slightly boring...
(http://lh4.ggpht.com/_gbC_B2NkUEo/TCRC0xZ0Z0I/AAAAAAAAAgk/Nrf4m-CxF9w/glaciel%20beatle.jpg)

  and here is a 3d z^3 I banged out with the complex triplex formula (1200x1200 z res = 3*  took 11 minutes 1 second with an animation calculating in the background!),  it's simply a phenomenal formula  (click here to view bigger) (http://lh3.ggpht.com/_gbC_B2NkUEo/TCRC1EWq6dI/AAAAAAAAAgo/Glv0ZvSBG00/complex%20triplex%20top%20color%20change%20big.jpg) :
(http://lh3.ggpht.com/_gbC_B2NkUEo/TCRC1EWq6dI/AAAAAAAAAgo/Glv0ZvSBG00/complex%20triplex%20top%20color%20change%20big.jpg)

  Here is the quick video... don't know why, but 480p isn't working (probably a bit later it will) on youtube (I can set it to 480p, but it still looks bad).
http://www.youtube.com/watch?v=4htck30jHpE (http://www.youtube.com/watch?v=4htck30jHpE)

  This new way of looking at complex numbers extended to higher dimensions can be applied to other formulas as well, like my mag vs. xyz fractals, type D2, or any rotation based fractal.  I'll do a release of the various fractals later, starting with mag vs. xyz style, modified to have:

victor= complex (sx + i * sqrt (sqr (sy) + sqr (sz) )));
bravo= complex (sy + i * (sqrt (sqr (sx) + sqr (sz) )));
cramden= complex (sz + i * (sqrt (sqr (sx) + sqr (sy) )))................


  Anyways, the idea doesn't really work that well, at least in the ways that I've applied it.  I do think that the Christmas tree fractal formula is the "real deal" for a few reasons.

  The 2d Mandelbrot sets asymmetry over the +/- x axis for even n (z^2,4,6...) is extended to the 3d set, but it is magnified by the asymmetry of the y-z portion of the formula which results in the very asymmetric even n 3d fractals.