Great shapes indeed!
Can't wait to play with these algorithms too...
If you like I'll make my script available. But it is not easy to use (at first).
Yes I remember
. 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
) 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.
)
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!
Nice rendering! (as usual
) 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?