Logo by mrob - Contribute your own Logo!
News:
<- Like it? why not donate for continuity of this forum!
info about usage
 
*
Welcome, Guest. Please login or register. October 24, 2014, 04:41:04 PM


Login with username, password and session length



Pages: [1] 2 3 ... 10   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: Kaleidoscopic (escape time) IFS  (Read 34729 times)
Description: An interresing class of fractals
0 Members and 1 Guest are viewing this topic.
knighty
Fractal Bachius
*
Posts: 570


« on: May 01, 2010, 10:02:40 PM »

Hello,
Here are some renderings of a class of fractals which I call "Kaleidoscopic IFS". There is a big variations of shapes one can get with this method.
I began with this algorithm to get DE for symmetric Sierpinski tetrahedron:
Code:
//scale=2
//bailout=1000
sierpinski3(x,y,z){
   r=x*x+y*y+z*z;
   for(i=0;i<10 && r<bailout;i++){
      //Folding... These are some of the symmetry planes of the tetrahedron
      if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
      if(y+z<0){y1=-z;z=-y;y=y1;}
      
      //Stretche about the point [1,1,1]*(scale-1)/scale; The "(scale-1)/scale" is here in order to keep the size of the fractal constant wrt scale
      x=scale*x-(scale-1);//equivalent to: x=scale*(x-cx); where cx=(scale-1)/scale;
      y=scale*y-(scale-1);
      z=scale*z-(scale-1);
      r=x*x+y*y+z*z;
   }
   return (sqrt(r)-2)*scale^(-i);//the estimated distance
}
Then I added a rotation before the fold or before the stretch or both.
Code:
//scale=2
//bailout=1000
sierpinski3(x,y,z){
   r=x*x+y*y+z*z;
   for(i=0;i<10 && r<bailout;i++){
      rotate1(x,y,z);
      
      if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
      if(y+z<0){y1=-z;z=-y;y=y1;}
      
      rotate2(x,y,z);

      x=scale*x-(scale-1);
      y=scale*y-(scale-1);
      z=scale*z-(scale-1);
      r=x*x+y*y+z*z;
   }
   return (sqrt(r)-2)*scale^(-i);//the estimated distance
}
Then I allowed the center of stretching to be modified.
Code:
//scale=2
//bailout=1000
sierpinski3(x,y,z){
   r=x*x+y*y+z*z;
   for(i=0;i<10 && r<bailout;i++){
      rotate1(x,y,z);
      
      if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
      if(y+z<0){y1=-z;z=-y;y=y1;}
      
      rotate2(x,y,z);

      x=scale*x-CX*(scale-1);
      y=scale*y-CY*(scale-1);
      z=scale*z-CZ*(scale-1);
      r=x*x+y*y+z*z;
   }
   return (sqrt(r)-2)*scale^(-i);//the estimated distance
}
(In my implementation [CX,CY,CZ] is constrained to be on the unit sphere)
This gives 1+3+3+2=9 parameters in total (scale->1,rotation1->3,rotation2->3,center of stretch->2).

The set of folding operation may be different. Here are those that I've tried:
- half tetrahedral symmetry planes: the same than above.
Code:
     if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
      if(y+z<0){y1=-z;z=-y;y=y1;}
- 2nd half tetrahedral symmetry planes:
Code:
     if(x-y<0){x1=y;y=x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(y-z<0){y1=z;z=y;y=y1;}
- full tetrahedral symmetry planes:
Code:
     if(x-y<0){x1=y;y=x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(y-z<0){y1=z;z=y;y=y1;}
      if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
      if(y+z<0){y1=-z;z=-y;y=y1;}
- cubic symmetry planes:
Code:
     x=abs(x);y=abs(y);z=abs(z);
- half octahedral symmetry planes:
Code:
     if(x-y<0){x1=y;y=x;x=x1;}
      if(x+y<0){x1=-y;y=-x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(x+z<0){x1=-z;z=-x;x=x1;}
- full octahedral symmetry planes:
Code:
     x=abs(x);y=abs(y);z=abs(z);
      if(x-y<0){x1=y;y=x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(y-z<0){y1=z;z=y;y=y1;}

Ah! I forgot the pictures grin:






se also: http://www.fractalforums.com/index.php?action=gallery;su=user;cat=164;u=932



The last picture is done with this algorithm:
Code:
Menger3(x,y,z){
   r=x*x+y*y+z*z;
   for(i=0;i<MI && r<bailout;i++){
      rotate1(x,y,z);

      x=abs(x);y=abs(y);z=abs(z);
      if(x-y<0){x1=y;y=x;x=x1;}
      if(x-z<0){x1=z;z=x;x=x1;}
      if(y-z<0){y1=z;z=y;y=y1;}

      rotate2(x,y,z);
    
      x=scale*x-CX*(scale-1);
      y=scale*y-CY*(scale-1);
      z=scale*z;
      if(z>0.5*CZ*(scale-1)) z-=CZ*(scale-1);
      
      r=x*x+y*y+z*z;
   }
   return (sqrt(x*x+y*y+z*z)-2)*scale^(-i);
}
Which gives the menger sponge when used with CX=CY=CZ=1, scale=3 and no rotation.
« Last Edit: May 01, 2010, 10:07:13 PM by knighty » Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #1 on: May 01, 2010, 11:58:33 PM »

Most excellent, I'll definitely be playing with these at some point wink
Logged

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

http://www.fractalgallery.co.uk/
"Makin' Magic Music" on Jango
subblue
Conqueror
*******
Posts: 113



WWW
« Reply #2 on: May 02, 2010, 10:01:50 AM »

Very interesting. I particularly like the last one smiley
Logged

www.subblue.com - a blog exploring mathematical and generative graphics
Rathinagiri
Fractal Fertilizer
*****
Posts: 362


« Reply #3 on: May 02, 2010, 10:52:35 AM »

Nice one.
Logged
Nahee_Enterprises
World Renowned
Fractal Senior
******
Posts: 2251


use email to contact


nahee_enterprises Nahee.Enterprises NaheeEnterprise
WWW
« Reply #4 on: May 02, 2010, 12:48:28 PM »

Here are some renderings of a class of fractals which I call "Kaleidoscopic IFS".
   ...........
The last picture is done with this algorithm:
   ...........
Which gives the menger sponge when used with CX=CY=CZ=1, scale=3 and no rotation.

This last image is very intriguing!!!  A lot of possibilities!!!   smiley
 
Logged

kram1032
Fractal Senior
******
Posts: 1587


« Reply #5 on: May 02, 2010, 01:57:12 PM »

those patterns are beautiful
Logged
subblue
Conqueror
*******
Posts: 113



WWW
« Reply #6 on: May 02, 2010, 05:21:22 PM »

I've used your Menger sponge algorithm as a starting point and found with scale of 1.3, a single rotation r.y of 25 degs and C values of [2, 4.8, 0] I get these tree structures. The sequence is made by changing r.y. The last image has a Glynn type fractal in there smiley


Logged

www.subblue.com - a blog exploring mathematical and generative graphics
matsoljare
Iterator
*
Posts: 185



WWW
« Reply #7 on: May 02, 2010, 10:28:01 PM »

The second and fourth in the first post are especially interesting. Can you try varying one of the values with one of the axis?
Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #8 on: May 02, 2010, 11:01:12 PM »

Thanks  Azn
Amazing one subblue! At some point, it looks like savannah. You are using the GPU I gess. Is it realtime?

There are many other known fractals that may appear from nowhere. I've already met the Koch curve, cantor dust and others I don't know the name. The variation of possible shapes, from geometric figures to organic forms, still amazes me. The possibilities are infinite  wink, not only by changing the parameters but also by changing the algorithm.

What I've described in the O.P. is actually what I've explored so far. The main ingredients are the folding and the stretching, that is, kneading the space grin. Then add some salt and spice. Seriously! In the case of this class of fractals, folding are done about planes and stretching is an homothety. The rotations may be the salt and spice. I realize now that one can insert as many rotations between the foldings. In principle other transformations than a rotation can be used (but I may be wrong). The nice thing with rotation (and other orthonormal transformations) is that the distance estimation remains very simple and the generated distance field is continuous. I guess because they don't add stretching.

I think the kneading process is what is done to generate escape time fractals in general... but this is a little bit off topic. I'll start another thread.

PS: Most ideas behind these fractals were found in this forum. wink
PS2: BTW, I think these fractals may be rendered as attractor set just like classical IFS or julia sets.
Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #9 on: May 02, 2010, 11:10:04 PM »

The second and fourth in the first post are especially interesting. Can you try varying one of the values with one of the axis?
Unfortunatly, I have forgotten the parameters used for these pictures. Currently, in my program (actually an evaldraw script), it's impossible to save the parameters. I'll try to find them and do some little image sequences.
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #10 on: May 03, 2010, 05:58:41 PM »

Hi knighty, how did you derive:

    (sqrt(r)-2)*scale^(-i)

?
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: 199


WWW
« Reply #11 on: May 03, 2010, 07:42:57 PM »

I think the "-2" is not needed as R will be greater than the bailout, so substracting 2 does not make a big difference.
For the rest the DE is the same as the one for the Mandelbox..

BTW, I accidentally dropped my Menger sponge :


* KaleidoIFS_005.jpg (246.88 KB, 960x960 - viewed 640 times.)
Logged
David Makin
Global Moderator
Fractal Senior
******
Posts: 2269



Makin' Magic Fractals
WWW
« Reply #12 on: May 03, 2010, 09:19:24 PM »

It was the "-2" that I was wondering about 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
knighty
Fractal Bachius
*
Posts: 570


« Reply #13 on: May 03, 2010, 09:32:27 PM »

The -2 is in reality the radius of a bounding sphere of the fractal (this is not the smallest one. In my case it's 1 for the octo-sierpinski and sqrt(3) for the tetra-sierpinski and the octahedron). If you use say max_iterations=10, when zooming you obtain at some point only dust and the rendering becomes much slower. It is not necessary when using a big max_iterations, the dust is hidden by the solid threshold.

I do the same thing for Tglad's amazing box for the same reason. For the mandelbulb I use sometime a similar technique. Instead of DE=0.5*r*log(r)/dr, I use DE=0.5*r*log(sqrt(r^2+1.5^2)-1.5). All this is in order to get a DE based solid threshold consistant with max iterations solid threshold.

Also, on can use the distance to the bounding volume of the fractal instead of the bounding sphere. in the case of the tetra sierpinski it's simply (and obviousely) a tetrahedron... etc. In general it isn't worth the pain. I'll post the full algorithms later.


Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #14 on: May 03, 2010, 09:37:05 PM »

BTW, I accidentally dropped my Menger sponge :
At the angle there is a Koch triangle!  grin
Logged
Pages: [1] 2 3 ... 10   Go Down
  Print  
 
Jump to:  



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 0.669 seconds with 31 queries. (Pretty URLs adds 0.034s, 2q)