Logo by chaos_crystal - Contribute your own Logo!
News: Support the forums via Fractalforums.com Online Store
 
*
Welcome, Guest. Please login or register. October 31, 2014, 06:44:59 PM


Login with username, password and session length



Pages: 1 ... 7 8 [9] 10 11 ... 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 279057 times)
0 Members and 1 Guest are viewing this topic.
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #120 on: August 19, 2009, 03:29:16 PM »

Wow, how awesome is that?! For all those frames one would think you're using a 40-core from the future. And in your own raytracer too. Did you use global illumination?
Logged
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 5674


formerly known as 'Trifox'


WWW
« Reply #121 on: August 22, 2009, 01:07:41 AM »

respects budhi!
Logged

---

divide and conquer - iterate and rule - chaos is No random!
Buddhi
Fractal Molossus
**
Posts: 655



WWW
« Reply #122 on: August 22, 2009, 09:20:11 AM »

Hi
I made some interesting experiment with hypercomplex formula. I used 4th dimension instead 3rd (x,y and w). It looks so strange  grin

http://www.fractalforums.com/gallery/?sa=view;id=873

http://www.fractalforums.com/gallery/?sa=view;id=874

Logged

David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #123 on: August 27, 2009, 11:08:42 PM »

Hi all,

Regarding the "delta" method using the differences in smooth iteration count, a friend asked me for clarification so here's the pseudo-code I sent him, I thought more people may be interested smiley

----------------------
Code:

Assume position on ray is "vp+alpha*d" where vp is the viewpoint and d is our normalised direction vector for the viewing ray.
We want to scan along the ray segment from a start point dictated by our front cutting plane giving us a starting value for alpha to our end point
dictated by the back cutting plane giving us an end value for alpha.
We use an array "maxd[maxiter]" for storing maximum distances to step at each iteration level.
Proceed as follows:
 
For each ray:
  alpha = starting alpha (as dictated by front clip)
  Set all maxd[n] to a maximum step distance value (usually a user parameter) - n from 0 to maxiter
  step = 0
  done = false
  binary search = false
  alpha found = end alpha
  repeat
     compute point p = vp + alpha*d
     oldstep = step
     iterate point p (set i to number of iterations done here and remember final values for computing smooth iteration)
     if not reached maxiter
       compute point p = vp + (alpha+abit)*d  ;----- where abit is a user parameter, say 1e-10
       Iterate point p
       if reached maxiter
          if oldstep==0
            alpha found = current alpha
            done = true
         else
           step = oldstep/2
           binary search = true
           alpha = alpha - step
         endif
       else
          compute smooth iteration value for first iteration s0
          compute smooth iteration value for second iteration s1
          compute directional DE = 1.0/(1.0+(1/abit)*abs(s1-s0))
          if binary search
            step = oldstep/2
            if DE>solid threshold ;--------- solid threshold is a user parameter, say 1e-4
               alpha = alpha + step
            else
               alpha = alpha - step
            endif
            if step<min accuracy ;--- min accuracy is a user parameter, say 1e-8
               alpha found = current alpha
               done = true
            endif
          elseif directional DE < solid threshold ;--------- solid threshold is a user parameter, say 1e-4
             step = oldstep/2
             binary search = true
             alpha = alpha - step
          else
             if maxd[i]<directional DE
               directional DE = maxd[i]
             else
                maxd[i] = directional DE
             endif
             if directional DE < maxd[i+1] ;***********ADDED
                maxd[i+1] = directional DE
             endif
             alpha = alpha + (step=directional DE/scale value) ;---- I use scale value = @scale*2.5 where @scale is a user parameter
;                                                                                                               default 1.0
           endif
       endif
     elseif oldstep==0
        alpha found = current alpha
        done = true
     else
       step = oldstep/2
       binary search = true
       alpha = alpha - step
     endif
  until  done || alpha>=end position
----------------------

EDIT: Please note the "****ADDED section - I checked and it is actually necessary to conditionally store the DE value found as the maximum for the next iteration depth.

EDIT#2: (August 28th 2009) The code above has now been modified such that if the first iteration does not reach maxiter but the second does then we test to see if it's the first point on the ray in which case we exit with solid found or if not the first point then we initiate the binary search. Also I've optimised the code such that smooth iteration values are only calculated when absolutely necessary and modified the binary search section slightly.

EDIT #3: (October 5th 2009) Corrected the rather alarming oversight of not assigning the new calculated step distance to the "step" variable when not in the binary search smiley I even made the same mistake in my original implimented version !
« Last Edit: October 06, 2009, 12:43:55 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
Buddhi
Fractal Molossus
**
Posts: 655



WWW
« Reply #124 on: August 30, 2009, 01:39:28 PM »

Hi

David, you prepared very nice algorithm for DE.  It looks very simple - good idea with this double computation. You don't have to derive formulas for derivatives. Sometimes numeric methods are the best and simple.

Today I made some experiments with completely another approach to calculate iterations. I tried to convert Twenbee's idea to make rotations of vectors using complex numbers. First I normalize all vectors because when abs(z)=1 then abs(z^2)=abs(z). Then square of complex number is the same like doubling angle of vector without changing length of vector.

I expected the same results as using trigonometric calculations but fractal looks different. Maybe I made some mistake somewhere.

Below is C code for iteration
Code:
double r = sqrt(xx*xx+yy*yy+zz*zz);
xx = xx/r;
yy = yy/r;
zz = zz/r;
/* --- rotation - axis Z  */
//vector normalization:        
r1 = sqrt(xx*xx+yy*yy);
xx = xx/r1;
yy = yy/r1;
zz = zz/r1;
//complex numbers calculation
newx1 = xx*xx - yy*yy;
newy1 = 2.0*xx*yy;
newz1 = zz;
       
//---- rotation XY ------
r2 = sqrt(newx1*newx1+newy1*newy1);
//normalization:
r3 = sqrt(r2*r2+newz1*newz1);
newx1 = newx1/r3;
newy1 = newy1/r3;
newz1 = newz1/r3;
r2 = r2/r3;
//complex numbers calculation
newr2 = r2*r2 - newz1*newz1;
newz2 = 2.0*r2*newz1;
//spread result for 2 vectors (x and y)
rr = newr2/r2;
newx2 = newx1*rr;
newy2 = newy1*rr;        

//multiplying by normalization factors        
m=r*r*r1*r3;
newx = newx2*m;
newy = newy2*m;
newz = newz2*m;
       
xx = newx + aa;
yy = newy + bb;
zz = newz + cc;

...and the result:

http://www.fractalforums.com/gallery/?sa=view;id=881

« Last Edit: August 30, 2009, 01:56:38 PM by Buddhi » Logged

bugman
Conqueror
*******
Posts: 122



WWW
« Reply #125 on: August 30, 2009, 04:25:45 PM »

Here are some higher power variations of Twinbee's Mandelbrot set using the following formula:
{x,y,z}^n = r^n{cos(n*theta)cos(n*phi),sin(n*theta)cos(n*phi),-sin(n*phi)}
r=sqrt(x▓+y▓+z▓), theta=atan(y/x), phi=atan(z/sqrt(x▓+y▓))

(Can anyone tell me why Fractal Forums is making this image so small?)


* Mandelbrot-White-N.jpg (127.54 KB, 556x371 - viewed 2879 times.)

* Mandelbrot-White7-large.jpg (196.29 KB, 560x560 - viewed 3011 times.)
« Last Edit: September 04, 2009, 09:29:17 PM by bugman, Reason: Bigger pictures » Logged
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #126 on: September 02, 2009, 03:22:29 AM »

Cool stuff indeed, like a Sea anemone or that shell I posted months ago.

Not sure about the forum resoution thing, but here's a link to my fave version at a higher res than previously:
http://www.bugman123.com/Hypercomplex/Mandelbrot-White8-large.jpg

I'm guessing it's globally illuminated right? Interesting to see such ambient lighting with GI. I'd like to see more directional lighting (as well), and also without those small bright 'bits'. But that's not all, I'd like a 3000x3000 version if poss with less noise and maybe more iterations smiley Seriously, love to see it close to those specs.
« Last Edit: September 02, 2009, 03:24:41 AM by twinbee » Logged
Buddhi
Fractal Molossus
**
Posts: 655



WWW
« Reply #127 on: September 03, 2009, 06:33:59 PM »

Hi Twinbee
I'd like a 3000x3000 version if poss with less noise and maybe more iterations smiley Seriously, love to see it close to those specs.
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render cheesy
Logged

David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #128 on: September 03, 2009, 09:30:13 PM »

Hi Twinbee
I'd like a 3000x3000 version if poss with less noise and maybe more iterations smiley Seriously, love to see it close to those specs.
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render cheesy

Hi all, here's a zoom into said fractal:



Magnification approx. *22 max iter. 256 - based on this detail 3000*3000*3000 is not enough !
Because of the number of multiplies and in particular because of the trig functions this 640*480 render took 12.5 minutes - but then again this PC/CPU/FPU is essentially an antique
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 5674


formerly known as 'Trifox'


WWW
« Reply #129 on: September 03, 2009, 10:16:38 PM »


(Can anyone tell me why Fractal Forums is making this image so small?)


 police .... one image is the thumbnail, and the other resolution is rescaled to a max version, perhaps i can adjust the image size in the settings ... i will see ... bigger images can be placed in the gallery and linked !  police
Logged

---

divide and conquer - iterate and rule - chaos is No random!
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 5674


formerly known as 'Trifox'


WWW
« Reply #130 on: September 03, 2009, 10:20:15 PM »

have i said that this thread is by far the most interesting here ?!?!?! new formulas, rendered in excellent ways, and really lots
of people contribute ( too many to list them all wink ... ) great work guys, and keep on doing that i hope i will manage to create a fancy
realtime gpu fractal renderer this year ( winter is standing in front of the door  ) , i would love seeing those objects interactively ...

keep on!
 afro afro afro afro police


@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....
why is it that the outlines of the object are black !??!
« Last Edit: September 03, 2009, 10:33:46 PM by Trifox » Logged

---

divide and conquer - iterate and rule - chaos is No random!
David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #131 on: September 04, 2009, 01:18:03 AM »

@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....
why is it that the outlines of the object are black !??!

In the prototype UF formula I used the fractal is calculated in the global section and the normals are calculated directly from the z-buffer using the centre point and 4 adjacent points giving 4 triangles. The 4 adjacent points are tested for validity i.e. they're invalid if there's no surface or if the adjacent point is further than a given threshold away from the central point - the valid (up to four) (non-unit) normals are summed and the result is normalised.
This render was my very first attempt at zooming into this particular fractal and I didn't play around tweaking the distance limit ("joined threshold") for deciding when points are valid for use in the normal calculation, the result being that on the edges of overlap the normals are calculated as being almost perpendicular to line of sight.
The other reason I didn't tinker with the value is that the black outlines do actually help in this case since it's purely diffuse lighting without shadows and if I used the "correct" "joined threshold" the depth perception of the render would vanish (without using animation).
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
cKleinhuis
Administrator
Fractal Senior
*******
Posts: 5674


formerly known as 'Trifox'


WWW
« Reply #132 on: September 04, 2009, 02:49:00 AM »

@dave, i see, about the diffuse lighting you might be right, i am impressed by the shapes, the shapes get more interesting at higher iterations,
anyway, i need to test those formulas also, because i was always disappointed with the shapes of the quaternions, even though they where 4d
they just looked like a stretched mandelbrot around some axes ... those formulas really inspire me, and i am enjoying that they look how one ( me ? )
naturally thinks of a 3 ( or 4 ) D mandelbrot ... hehe, very nice mathematical experiments !!! police police police police police
Logged

---

divide and conquer - iterate and rule - chaos is No random!
twinbee
Fractal Fertilizer
*****
Posts: 383



WWW
« Reply #133 on: September 04, 2009, 03:06:23 AM »

Quote
Now I'm rendering z^7+b fractal using your trigonometric formula in 3000x3000x3000 resolution with 256 iterations. In few days it will be done . It should take about 50 hours to render
Can't wait!  cheesy

I think the thing that's dawning on me about the higher power version from bugman's sea anemone pic is that the 'bits have bits'. In other words, it's meeting the stricter definition of the word 'fractal' smiley I wonder if the smaller bits have bits too. It's hard to tell from the resolution, but if they do, then it's anyone's guess what happens when you zoom in.

What happens to the math to make these higher power versions more 'fractal-like' than the standard ^1 original?
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #134 on: September 04, 2009, 03:17:49 AM »

@dave if the shape would be green it would look like a vegetable ! hmm, yummy yummy ....

Here you are:



Mag *1284
max. iter. 256, delta DE threshold 1e-4 - in other words the same detail settings as the other versions I put in my 3D examples gallery.

@Twinbee - yes, with decreased DE threshold (and maybe increased max. iter.) then the bits will have more bits smiley

I'm guessing but I think the fractal dimension of the *surface* could be 3 ?
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 ... 7 8 [9] 10 11 ... 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 17257 Last post December 08, 2011, 04:27:52 PM
by Alef
Re: True 3D mandelbrot type fractal Mandelbulb Software shanest 2 8184 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 47691 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 1773 Last post October 21, 2010, 07:14:00 AM
by M Benesi
My First Mandelbrot...Okay not true. Images Showcase (Rate My Fractal) Zephitmaal 3 1173 Last post January 07, 2012, 04:30:36 PM
by Pauldelbrot

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

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