Logo by reallybigname - Contribute your own Logo!
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. July 28, 2014, 06:13:42 AM


Login with username, password and session length



Pages: 1 ... 26 27 [28] 29 30 ... 37   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: True 3D mandelbrot type fractal  (Read 271703 times)
0 Members and 1 Guest are viewing this topic.
JosLeys
Iterator
*
Posts: 195


WWW
« Reply #405 on: November 09, 2009, 05:21:47 PM »

Well , I see
Quote
theta = atan2(sqrt(x^2 + y^2) , z)

Sorry, my mistake then. In my code I'm actually using pi/2-theta by mistake.
Let's see if that makes my "tunnels" go away...
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #406 on: November 09, 2009, 05:28:47 PM »

Quote
Jos I'd be interested to know exactly what your formula was that was producing the "holes" since it's quite different from what I get from any versions of the formula

OK, here it is : (the first part handles what is needed for the derivative)
   dzx= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*cos(thdz+(@pow-1)*th)+c
   dzy= @pow*(R^(@pow-1))*Rdz*sin(phdz+(@pow-1)*ph)*sin(thdz+(@pow-1)*th)
   dzz= @pow*(R^(@pow-1))*Rdz*cos(phdz+(@pow-1)*ph)
     Rdz=sqrt(dzx*dzx+dzy*dzy+dzz*dzz)
     thdz=atan2(dzx+i*dzy)
     phdz=acos(dzz/Rdz)

   zx= (R^@pow)*sin(@pow*ph)*cos(@pow*th)+cx
   zy= (R^@pow)*sin(@pow*ph)*sin(@pow*th)+cy
   zz=(R^@pow)*cos(@pow*ph)+cz
     R=sqrt(zx*zx+zy*zy+zz*zz)
     th=atan2(zx+i*zy)
     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)

..but remember, as I said, it could still well be a weird rendering error

I should read code more carefully Jos - I just noticed you have:

     phdz=acos(dzz/Rdz)

but:

     ph=atan2(sqrt(zx*zx+zy*zy)+i*zz)
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
JosLeys
Iterator
*
Posts: 195


WWW
« Reply #407 on: November 09, 2009, 05:41:08 PM »

Well it seems I was using the complement of the angle by mistake.
The 'holes' are now plugged.
Sorry for the wild goose chase


* 4D_test_88cbis.jpg (159.5 KB, 640x640 - viewed 826 times.)
Logged
bugman
Conqueror
*******
Posts: 122



WWW
« Reply #408 on: November 09, 2009, 05:57:57 PM »

I would really like to ask xenodreambuie, how did you find the roots for the -2 power triplex? Do you have a means of finding the roots for arbitrary powers, and if so, how do you verify root validity?

I tried to create a 3D Glynn set using MIIM, but no luck so far. I also found that my MIIM code did nothing to improve my 4th order inverse 3D Julia set. On the up side, I was able to reproduce some similar images to xenodreambuie's 3D Julia sets using the MIIM code.

What does "flip" mean in UltraFractal code?
« Last Edit: November 09, 2009, 06:13:40 PM by bugman » Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #409 on: November 09, 2009, 06:00:12 PM »

Well it seems I was using the complement of the angle by mistake.
The 'holes' are now plugged.
Sorry for the wild goose chase


No problem - it helped because I just noticed the obvious with respect to my version of the analytical DE and changed it so that ph and th do not need precalculatiing - it just needed their calculation moving to the start of the iteration loop !
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #410 on: November 09, 2009, 06:02:32 PM »

(like "flip" for example).


Hi Paul

flip(f)

is just i*f

smiley

Edit: Aargh - make that flip(x+i*y) is (y+i*x) !
« Last Edit: October 01, 2011, 06:46:44 AM 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
JosLeys
Iterator
*
Posts: 195


WWW
« Reply #411 on: November 09, 2009, 08:44:16 PM »

Now that I know that my distance estimate formula works better than I thought, I tried a really deep zoom.
The image below has magnification 28.8 million, and the surface treshold is 10^-12. If I haven't made a mistake, this means that if the total object is the size of the earth, then we are looking at an area the size of a dining table.

I think this about as deep as I can go with current state of the code.


* 4D_test_89l.jpg (179.62 KB, 640x640 - viewed 1036 times.)
Logged
xenodreambuie
Safarist
******
Posts: 80



WWW
« Reply #412 on: November 09, 2009, 10:05:09 PM »

I would really like to ask xenodreambuie, how did you find the roots for the -2 power triplex? Do you have a means of finding the roots for arbitrary powers, and if so, how do you verify root validity?

I tried to create a 3D Glynn set using MIIM, but no luck so far. I also found that my MIIM code did nothing to improve my 4th order inverse 3D Julia set. On the up side, I was able to reproduce some similar images to xenodreambuie's 3D Julia sets using the MIIM code.


Peter Liepa's MIIM code works for all powers, since it uses Abs(power) in the appropriate places. Integer powers always have abs(power) roots, so for the triplex I didn't have to do anything different for -2.

However, for fractional powers the modifications to the sin and true cos complicate the root validity checks. I tried just cancelling those out for the validity tests. Also I think the rootlimit for phi uses pi rather than 2pi. However, as I never got worthwhile results with 1.5 or other fractional powers, I don't know for sure whether I had the correct validity tests. I came to the conclusion that a good 1.5 triplex is unlikely. It's a tricky enough beast in 2D.
Logged

Regards, Garth
http://xenodream.com
bugman
Conqueror
*******
Posts: 122



WWW
« Reply #413 on: November 09, 2009, 11:30:56 PM »

Peter Liepa's MIIM code works for all powers, since it uses Abs(power) in the appropriate places. Integer powers always have abs(power) roots, so for the triplex I didn't have to do anything different for -2.

However, for fractional powers the modifications to the sin and true cos complicate the root validity checks. I tried just cancelling those out for the validity tests. Also I think the rootlimit for phi uses pi rather than 2pi. However, as I never got worthwhile results with 1.5 or other fractional powers, I don't know for sure whether I had the correct validity tests. I came to the conclusion that a good 1.5 triplex is unlikely. It's a tricky enough beast in 2D.

Which formulas are you referring to by "sin" and "true cos"? If you refer to the formulas on my previous post, you will see that I don't know of any formula for the triplex that produce abs(power) roots. Are you adding multiples of 2pi to both rotational angles theta and phi, or just phi, or are you doing something else?
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #414 on: November 10, 2009, 12:02:21 AM »

Now that I know that my distance estimate formula works better than I thought, I tried a really deep zoom.
The image below has magnification 28.8 million, and the surface treshold is 10^-12. If I haven't made a mistake, this means that if the total object is the size of the earth, then we are looking at an area the size of a dining table.

I think this about as deep as I can go with current state of the code.

Hi Jos - to avoid the "stepping" just add the binary search between the last two steps to find the exact threshold - or as Paul Nylander suggested you could try a weighted search instead which may possibly be more optimum - though supposedly we're dealing with a linear value so it should really actually be slower than a plain binary search due to the extra maths required - I haven't tried it smiley
Or was it Garth who suggested it ? Apologies to the relevant party !
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #415 on: November 10, 2009, 01:10:57 AM »

I had the same idea as Jos regarding testing his analytical DE algorithm on a deep zoom, but my machines probalbly not quite so fast smiley

Anyway, here you are:



A 9th degree White/Nylander (actually a zoom of Tower Gardens).

Magnification approx. 2.58E12
Solid Threshold: 4E-14

Rendered @1280*960 in 1 hour 10mins on a 2GHz core2duo.
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #416 on: November 10, 2009, 03:58:44 AM »

Okay had time recuperate... smiley

Quote
Just a suggestion - where you discuss the formula you could also mention Jos Leys' algorithm for accurate analytical DE for the formula (and related formulas such as Garth Thornton's variations and Rudy Rucker's formula).

Hi David, That's an idea, at least a mention would be good. I think Paul's done a good job of collecting the different formulas, so I probably won't repeat the math. But in any case, I may first link to some thread posts until I understand some of them better. Out of interest, how much faster is rendering after using Jos Leys' algorithm compared to before?

Cheers for the formulae Paul. I look forward to implementing it, especially the 4th power one. I take it that one can use it in conjunction with Jos Leys' DE algorithm?

Hi bib,
Quote
- In the 8-power monster, although the level of detail is infinite, I have the feeling that shapes do not vary as much as in the 2D M-set (2 or 8 power, it does not matter) when you zoom in. All is very self similar, and there is not such variery as you can find for example when you zoom near a minibrot in 2D. What do you think about that?

Alas, I agree. The variety is extensive, but nowhere near as good as the real thing would be. That's why I said at the end: "but again, they wouldn't compare to the variety one might expect from a 3D version of Seahorse valley.... That means the biggest secret is still under wraps".

There could still be some surprises left though I think. The inside has been hardly explored for instance.

Quote
Hi Daniel, it appears that you've quoted a different formula to the ones we've been using ?

Yes, the one I printed in the article is basically an arbitrary power version of my old formula from page 1 of this thread, except without the 0.5pi and 1pi offsets. The version on Paul's page is with the pi offsets. Both produce good (and pretty similar) results - I just like to try and simplify things as much as possible.

Quote
I presume for phi he meant atan(y/x) or atan2(x+flip(y)).

Nope I checked - it is atan2(y,x) at least in the c/c++ language.

Nice images Jos! I can add one to the article if you like. Congrats on the 28.8 million zoom too; interesting, I got the exact 'layered pixel' effect that you're getting in that image to begin with. As David said, one can use a binary chop type algorithm at the last stage to sort that out, though I still think it looks a kinda cool effect in itself.

Thanks everyone for the comments! smiley
« Last Edit: November 10, 2009, 04:01:54 AM by twinbee » Logged
xenodreambuie
Safarist
******
Posts: 80



WWW
« Reply #417 on: November 10, 2009, 05:59:56 AM »


Which formulas are you referring to by "sin" and "true cos"? If you refer to the formulas on my previous post, you will see that I don't know of any formula for the triplex that produce abs(power) roots. Are you adding multiples of 2pi to both rotational angles theta and phi, or just phi, or are you doing something else?

Hi Paul, my previous post was hasty due to rushing out. See if this makes sense.

I only use the trig formula, basically as yours but with three variations of phi handling. I had difficulty with the trig version roots initially, because treating the roots independently is not quite reversible due to spherical coordinates being a double cover if phi goes beyond pi (which it does when calculating powers greater than 1). To get equivalence to a forward iteration method requires some parity correction by pi to get the root in the right hemisphere of theta. It took some experiment and thought to get the two correct variations working.

When I wrote "using Abs(power) in appropriate places," I meant in setting the rootlimit and number of branches, and the multiplier for dp, so those all handle negative powers as is. The trig formulas don't need any special handling for negative power.

In my code I've dropped the root validity checking as I've given up on fractional powers, but rootlimit is still used for
some angle choices because it works. The following is pseudocode for clarity. (Delphi uses := for assignment, and I have some optimizations such as precomputing invpower, and computing sin and cos in a single sincos function.)

So I have, in all cases:

  NumBranches = ceil(abs(power));
  Numchoices = sqr(numbranches);
  rootlimit= abs(power)*pi;
 // ktheta and kphi are independent choices, from 0 to numbranches-1
  r = sqrt(sqr(x)+sqr(y)+sqr(z));
  theta= arctan2(y,x);
  theta= theta + 2pi*(ktheta - floor((theta+rootlimit)/2pi);

then, for standard triplex:
  theta= theta + kphi*pi; // a correction to get the parity of theta right
  phi = arcsin(z/r);
  if phi>0 then phi= phi - kphi*pi else phi= phi + kphi*pi;
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*cos(phi);
  y= r*sin(theta)*cos(phi);
// but for the inverse, z=-sin(phi) doesn't work. To get both hemispheres, need to compare new and old z
  newz= r*sin(phi);
  if newz*z>0 then newz= -newz;

or, for my variation of the z=cos(phi) triplex (the simple one with some flipped roots):
  phi = arccos(z/r);
  phi= phi + 2pi*(kphi - floor((phi+rootlimit)/2pi);
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*sin(phi);
  y= r*sin(theta)*sin(phi);
  z= r*cos(phi);

or, for the "true" z=cos(phi) triplex:
  theta= theta + kphi*pi;
  phi = arccos(z/r);
  phi= phi + 2pi*kphi;
  theta= theta/power;
  phi= phi/power;
  r= r^(1/power);
  x= r*cos(theta)*sin(phi);
  y= r*sin(theta)*sin(phi);
  z= r*cos(phi);

There may be a purer way to get the standard triplex working but I tried hard without success, so if you do find one, please post it.
Logged

Regards, Garth
http://xenodream.com
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #418 on: November 10, 2009, 08:24:07 AM »

Sorry had to say...

David, just seen some of your pics over at Deviantart - but your "The Honeycomb" pic - it's incredible! Great colours, material and choice of view!!

http://makinmagic.deviantart.com/art/The-Honeycomb-142102904

Let me know at any time if you would like me to replace it over Alien Coral in the mini gallery from my article.
« Last Edit: November 10, 2009, 09:06:40 AM by twinbee » Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2241



Makin' Magic Fractals
WWW
« Reply #419 on: November 10, 2009, 12:14:30 PM »

Sorry had to say...

David, just seen some of your pics over at Deviantart - but your "The Honeycomb" pic - it's incredible! Great colours, material and choice of view!!

http://makinmagic.deviantart.com/art/The-Honeycomb-142102904

Let me know at any time if you would like me to replace it over Alien Coral in the mini gallery from my article.

Thanks very much. As to using it instead of Alien Coral, it's up to you, I don't mind which is used smiley
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
Pages: 1 ... 26 27 [28] 29 30 ... 37   Go Down
  Print  
 
Jump to:  


Related Topics
Subject Started by Replies Views Last post
Implementation: 3D mandelbrot type fractal 3D Fractal Generation « 1 2 » steamraven 26 16908 Last post December 08, 2011, 04:27:52 PM
by Alef
Re: True 3D mandelbrot type fractal Mandelbulb Software shanest 2 8007 Last post November 20, 2009, 03:24:26 AM
by fractalrebel
True 3D mandelbrot fractal (search for the holy grail continues) 3D Fractal Generation « 1 2 ... 17 18 » illi 260 47517 Last post November 25, 2010, 12:57:55 AM
by cKleinhuis
New fractal type... latest 3d type.. a z^2 for Benoit Images Showcase (Rate My Fractal) M Benesi 0 1665 Last post October 21, 2010, 07:14:00 AM
by M Benesi
True 3D Mandelbrot ? Programming « 1 2 3 » David Makin 31 740 Last post July 25, 2014, 06:24:53 PM
by Alef

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.398 seconds with 31 queries. (Pretty URLs adds 0.021s, 2q)