News: Follow us on Twitter
 
*
Welcome, Guest. Please login or register. November 21, 2014, 06:35:07 PM


Login with username, password and session length



Pages: 1 2 [3] 4 5 ... 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 35317 times)
Description: An interresing class of fractals
0 Members and 1 Guest are viewing this topic.
Jesse
Download Section
Fractal Schemer
*
Posts: 1018


« Reply #30 on: May 06, 2010, 01:16:09 AM »

Nice rendering! (as usual  tongue stuck out) Is it a mix of juliabulb and tetra-sierpinski?

Not a julia (that gives even more possibilties), that was a power 8 bulb and the tetra-sierpinski.

A combination with TGlads box is one more option that gives another endless variety...
(only a quick test, no more time yet)

Logged
Hamilton
Alien
***
Posts: 22


« Reply #31 on: May 06, 2010, 10:48:55 AM »

Great shapes indeed!
Can't wait to play with these algorithms too... wink
Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #32 on: May 06, 2010, 09:17:27 PM »

Great shapes indeed!
Can't wait to play with these algorithms too... wink
If you like I'll make my script available. But it is not easy to use (at first).

Good stuff here...

If you remember some of my escape-time Sierpinskis, what you can do in general is define a set of vertices (e.g., those for an octahedron). Then for a given "z", find the nearest vertex. Reflect off the vertex, etc. using 2*(vertex)-point or something like that.

http://www.fractalforums.com/3d-fractal-generation/sierpinski-like-fractals-using-an-iterative-function/

-mike
Yes I remember wink. It's actually the starting point of these algorithms. The main difference is an explicit folding instead of choosing the nearest scaling center. I did so in order to make it GPU friendly.

What you do is perhaps (i'm not sure) more general but I was worrying about the continuity of the distance field. In fact I'm using a very simple DE based raymarcher that don't work well with discontinuous distance field.

Knighty, do you have some background information on how you constructed the generator code?
I mean, how does does
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;}  etc etc

generate the Sierpinsky ? ..and the code for the Menger sponge is also a bit of magic in my eyes..

I was trying to generate an octahedral Sierpinsky, but so far all my efforts have failed..

It is maybe easyer to visalize things in 2D. Let's take a 2D variant of msltoe's algorithm but for the sierpinski triangle. the coordinates of the centers of scaling are (1,0),(-0.5,sqrt(3)/2) and (-0.5,-sqrt(3)/2) (up to a rotation and scaling). In msltoe's algorithm at each iteration you take the scaling center that is closest to the current position then do the scaling (stretch) wrt the closest scaling center. But in our case the three centers are symmetric. There are 6 axis of symmetry. The idea is that choosing the nearest center of scaling is equivalent to reflect the current position about (some of) the symmetry axis in order to make it nearer to one of the centers. in the case of sierpinski triangle, two symmetries are enough. for example : the one that goes through (0,0) and (-0.5,-sqrt(3)/2) and the one that goes through (0,0) and (-0.5,sqrt(3)/2). They will "transport" any point of the plan in the area where they will be closer to (1,0) than the opposit centers.

In the case of octahedral sierpinski, there are 9 (need confirmation grin) planes of symmetry. if the vertices are: (1,0,0),(-1,0,0),(0,1,0),(0,-1,0),(0,0,1) and (0,0,-1) the planes of symmetry will be: x=0,y=0,z=0,x+y=0,x-y=0,x+z=0,x-z=0,y+z=0 and y-z=0. this full set is not necessary to get the octahedral sierpinski. Only 4 are needed. those that corresponds to (1,0,0) are x+y=0,x-y=0,x+z=0 and x-z=0.

With rotation, choosing the "minimal" set or the "full" set of planes of symmetry gives different results. The "full" set gives the most symmetric fractals.

That said, I realize that rotations before folding are equivalent to rotating the folding planes in the inverse direction. That means rotations are not necessary (but convenient) and can lead to some optimizations.(EDIT: this is not true.  hurt)

I'm just beginning to explore the math behind this fractals. They must have someting to do with Coxeter groups, among which the symmetries of the platonic solids, and paper folding maths (http://en.wikipedia.org/wiki/Coxeter_group,http://en.wikipedia.org/wiki/Mathematics_of_paper_folding).

Next step: "origami fractals". guess why!  alien

Nice rendering! (as usual  tongue stuck out) Is it a mix of juliabulb and tetra-sierpinski?

Not a julia (that gives even more possibilties), that was a power 8 bulb and the tetra-sierpinski.

A combination with TGlads box is one more option that gives another endless variety...
(only a quick test, no more time yet)

<http://www.fractalforums.com/gallery/2/1127_06_05_10_1_11_18.jpeg>
Thanks. Combining fractals is the coolest idea of all. Is it Tglad box then Mandelbulb or the reverse?
« Last Edit: May 12, 2010, 09:04:13 PM by knighty, Reason: I have to shut my mouth sometimes! » Logged
Jesse
Download Section
Fractal Schemer
*
Posts: 1018


« Reply #33 on: May 06, 2010, 10:01:58 PM »

Quote
Thanks. Combining fractals is the coolest idea of all. Is it Tglad box then Mandelbulb or the reverse?
(edit:)
The first one was 1 iteration pow8 bulb and 4 iterations sierpinski tetrahedron, the second was imho sierpinsky terahedron and mandbox in that row. Both with negative scalings.

Btw, many thanks for the code. Just have to reprogram many things to get 9 parameters changed!
I think that will give enough combinations, for now i have to play around with combis.

Another one like the second image, but with default parameters, means scaling 2 for both:

http://www.fractalforums.com/gallery/2/1127_07_05_10_3_40_21.jpeg
« Last Edit: May 07, 2010, 03:41:11 PM by Jesse » Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #34 on: May 06, 2010, 11:09:53 PM »

Just have to reprogram many things to get 9 parameters changed!
I think that will give enough combinations, for now i have to play around with combis.
The number of combinations is becoming very big. I'm thinking about using metaprogramming. I'm working on the idea of generating GPU shaders on this basis. For CPU native code, a just in time script compiler would be useful.
Logged
JosLeys
Iterator
*
Posts: 199


WWW
« Reply #35 on: May 07, 2010, 08:21:22 AM »

Thanks for the explanation.
Code for the octahedral Sierp :
Code:
scale=2
       if x+y<0, x1=-y,y=-x,x=x1,endif
       if x+z<0, x1=-z,z=-x,x=x1,endif
       if x-y<0, x1=y,y=x,x=x1,endif
       if x-z<0, x1=z,z=x,x=x1,endif

      x=x*scale-1*(scale-1)
      y=y*scale-0*(scale-1)
      z=z*scale-0*(scale-1)

Here it is :


* KaleidoIFS_018.jpg (124.01 KB, 960x960 - viewed 148 times.)
Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #36 on: May 08, 2010, 08:34:18 PM »

Nice one Azn
I'm working on dodeca and icosahedra-sierpinski. The folding set a little bit more difficult to find.
Logged
msltoe
Iterator
*
Posts: 161


« Reply #37 on: May 08, 2010, 08:55:55 PM »

It would be interesting to see if the folding plane solution produces the same results as the Julia vertex reflection for the icosahedron:



* ico.jpg (163.23 KB, 600x600 - viewed 150 times.)
Logged
subblue
Conqueror
*******
Posts: 113



WWW
« Reply #38 on: May 09, 2010, 01:52:01 AM »

Thanks Jos for the octahedral folding. It gives some very interesting structures.
I've had a busy evening building my own mechanical tree - only managed the stump so far though smiley






Logged

www.subblue.com - a blog exploring mathematical and generative graphics
knighty
Fractal Bachius
*
Posts: 570


« Reply #39 on: May 09, 2010, 11:39:47 AM »

Thanks Jos for the octahedral folding. It gives some very interesting structures.
I've had a busy evening building my own mechanical tree - only managed the stump so far though smiley

<Quoted Image Removed>

<Quoted Image Removed>
This is absolutely awesome subblue.

It would be interesting to see if the folding plane solution produces the same results as the Julia vertex reflection for the icosahedron:
Well, it should. I'll post the results later in case I succeed.
Logged
kram1032
Fractal Senior
******
Posts: 1605


« Reply #40 on: May 09, 2010, 12:00:13 PM »

whoa, GREAT subblue!
That's not too far away from a recursive Eifel-Tower cheesy
I guess, as that often is the case, that construction would be surprisingly stable, due to its fractal natue smiley
Logged
visual.bermarte
Strange Attractor
***
Posts: 289


« Reply #41 on: May 09, 2010, 01:46:08 PM »

Quick test (I have no time :-() Thanx to Mikael Hvidtfeldt (Syntopia) and Knighty!
<a href="http://fc00.deviantart.net/fs71/f/2010/129/d/5/Distorted_Menger_by_bermarte.swf" target="_blank">http://fc00.deviantart.net/fs71/f/2010/129/d/5/Distorted_Menger_by_bermarte.swf</a>
Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #42 on: May 09, 2010, 02:30:21 PM »

Thanks for the animation visual. Cool! smiley
Finally I've obtained a good folding planes set for the dodecahedra-siepinski. Their normal vectors are:
(phi^2,1,-phi) , (-phi,phi^2,1) , (1,-phi,phi^2) , (-phi*(1+phi),phi^2-1,1+phi) , (1+phi,-phi*(1+phi),phi^2-1)
and the x=0, y=0 and z=0 planes.

The center of scaling should be (1,0,phi) for the dodeca sirpinski.
Phi is the golden ratio (phi=(1+sqrt(5))/2).

Here is the code I used (note that the vectors are normalized):
Code:
#define _IVNORM_ (0.5/_PHI_)
#define _PHI1_ (_PHI_*_IVNORM_)
#define _1PHI_ (_IVNORM_)
#define _PHI2_ (_PHI_*_PHI_*_IVNORM_)

#define _IKVNORM_ 1/sqrt((_PHI_*(1+_PHI_))^2+(_PHI_^2-1)^2+(1+_PHI_)^2)
#define _C1_ (_PHI_*(1+_PHI_)*_IKVNORM_)
#define _C2_ ((_PHI_*_PHI_-1)*_IKVNORM_)
#define _1C_ ((1+_PHI_)*_IKVNORM_)
dodecasierpinski3(x,y,z,scale,rot[3][3]){
   r=x*x+y*y+z*z;
   i=0;
   for(i=0;i<MaxIteration && r<Bailout; i++){
#ifdef PRE_ROTATE
      x1=rot[0][0]*x+rot[1][0]*y+rot[2][0]*z;
      y1=rot[0][1]*x+rot[1][1]*y+rot[2][1]*z;
      z1=rot[0][2]*x+rot[1][2]*y+rot[2][2]*z;
      x=x1;y=y1;z=z1;
#endif      
      x=abs(x);
      y=abs(y);
      z=abs(z);
      t=_PHI2_*x+_1PHI_*y-_PHI1_*z;
      if(t<0){x=x-2*t*_PHI2_;y=y-2*t*_1PHI_;z=z+2*t*_PHI1_;}

      t=-_PHI1_*x+_PHI2_*y+_1PHI_*z;
      if(t<0){x=x+2*t*_PHI1_;y=y-2*t*_PHI2_;z=z-2*t*_1PHI_;}

      t=_1PHI_*x-_PHI1_*y+_PHI2_*z;
      if(t<0){x=x-2*t*_1PHI_;y=y+2*t*_PHI1_;z=z-2*t*_PHI2_;}

      t=-_C1_*x+_C2_*y+_1C_*z;
      if(t<0){x=x+2*t*_C1_;y=y-2*t*_C2_;z=z-2*t*_1C_;}

      t=_1C_*x-_C1_*y+_C2_*z;
      if(t<0){x=x-2*t*_1C_;y=y+2*t*_C1_;z=z-2*t*_C2_;}
      
#ifdef POST_ROTATE
      x1=rot[0][0]*x+rot[1][0]*y+rot[2][0]*z;
      y1=rot[0][1]*x+rot[1][1]*y+rot[2][1]*z;
      z1=rot[0][2]*x+rot[1][2]*y+rot[2][2]*z;
      x=x1;y=y1;z=z1;
#endif      
      x=scale*x-(scale-1)*stc[0];//stc is the center of scaling
      y=scale*y-(scale-1)*stc[1];
      z=scale*z-(scale-1)*stc[2];
      r=x*x+y*y+z*z;
   }
   return (sqrt(r)-2)*scale^(-i);
}

Now some results:
dodeca01. center of scaling (1,1,1); scale=phi^2


dodeca02. center of scaling (1,1,1); scale=2*phi


Icosa01. center of scaling (1,0,phi); scale=2


Icosa02. center of scaling (1,0,phi); scale=phi^2

« Last Edit: May 20, 2010, 11:19:11 PM by knighty, Reason: Confusion between dodeca and icosa (thaks Jos Leys) » Logged
knighty
Fractal Bachius
*
Posts: 570


« Reply #43 on: May 09, 2010, 02:40:19 PM »

Wanted to say two things:
1- In order to get interresting fractals, it's not necessary for the planes to go through (0,0,0). Any set of planes may give good fractal shapes. That's what I've called "origami fractals" grin
2- The distance estimate is very good and doesn't need (in general) to be scaled down. In some cases (when bailout is low) you need to scale it down a little (say descale=0.9 or 0.95).
Logged
JosLeys
Iterator
*
Posts: 199


WWW
« Reply #44 on: May 09, 2010, 03:33:25 PM »

Do you have the code for icosa also?
Logged
Pages: 1 2 [3] 4 5 ... 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.282 seconds with 27 queries. (Pretty URLs adds 0.029s, 2q)