Title: Sierpinski-like fractals using an iterative function Post by: msltoe on January 26, 2010, 03:36:18 AM In playing around with multiple attractors, I found that if I get rid of the "squaring" the radial part and just look at reflections of the vertices (which I call "attractors") of a polyhedron, I get something similar to a Sierpinski fractal.
Here's the algorithm for an icosahedron with 12 unity-normalized vertices (xv[k],yv[k],zv[k]): while ((norm<4)&&(iter<imax)) { iter++; min = 9999; jmin = 0; for (k = 0;k < 12;k++) { r = (x-xv[k])*(x-xv[k]) + (y-yv[k])*(y-yv[k]) + (z-zv[k])*(z-zv[k]) ; if (r<min) { min = r; jmin = k; } } x = a-2*x + xv[jmin]; y = b-2*y + yv[jmin]; z = c-2*z + zv[jmin]; norm = x*x+y*y+z*z; } Here's what it looks like with a closeup of the center. Title: Re: Sierpinski-like fractals using an iterative function Post by: kram1032 on January 26, 2010, 03:40:56 PM nice :D
Title: Re: Sierpinski-like fractals using an iterative function Post by: msltoe on January 28, 2010, 04:08:00 AM Treating the above algorithm as a Julia set (a,b,c = 0), the resulting object looks almost exactly like a Sierpinski icosahedron.
Title: Re: Sierpinski-like fractals using an iterative function Post by: Tglad on January 28, 2010, 06:34:58 AM There are many ways to make these Sierpinski objects, I think the original Sierpinski triangle came from a drawing game:
- draw 3 big dots on a piece of paper - put a dot anywhere between them 1. draw a new dot half way between this and any one of the big dots 2. goto 1 Amazingly, this simple game produces the sierpinski triangle if you do it enough times. It probably expands to 3d and icosahedrons, so: - pick any point inside an icosahedron 1. add a point half way between this and any of the corners 2. goto 1 Title: Re: Sierpinski-like fractals using an iterative function Post by: msltoe on January 28, 2010, 04:04:33 PM Tglad,
I agree. I noticed some of your latest objects have Sierpinski-like qualities, too. What I learned from my discovery (which someone else probably found years ago) was that I used a scaling operation (times -2) and a translation (to the nearest vertex) and got a shape that still "conforms", i.e., angles & local shape are retained. So, the question is now that we can obtain a Sierpinski fractal from a Mandelbrot (or Julia)-set-like generating algorithm, what other conformal mapping operations can we apply to this object to make it more interesting? -mike Title: Re: Sierpinski-like fractals using an iterative function Post by: kram1032 on January 28, 2010, 07:01:50 PM a Mandelbrot-style sierpinsky thingy :D that's actually pretty interesting, :)
Title: Re: Sierpinski-like fractals using an iterative function Post by: Tglad on January 29, 2010, 12:56:12 AM Yes, interesting... your mapping manages to be conformal by splitting the space up; conformal but not continuous.
It shows that conformal is more important than continuous in having a nice looking fractal... at least in this case. The other conformal mappings are: rotation by any angle/axis, reflection and inverse (scale each point by k/point's radius^2).. that's it. One thing the mandelbrot does is to double-cover the space each iteration. Quadruple covering might be possible using these mappings... Title: Re: Sierpinski-like fractals using an iterative function Post by: Timeroot on January 29, 2010, 01:15:08 AM Tglad, I agree. I noticed some of your latest objects have Sierpinski-like qualities, too. What I learned from my discovery (which someone else probably found years ago) was that I used a scaling operation (times -2) and a translation (to the nearest vertex) and got a shape that still "conforms", i.e., angles & local shape are retained. So, the question is now that we can obtain a Sierpinski fractal from a Mandelbrot (or Julia)-set-like generating algorithm, what other conformal mapping operations can we apply to this object to make it more interesting? -mike I would also like to see Julia Sets of this too. I'm wondering if the filled Julia Set or the correct definition of the Julia Set (the points which never reaches a fixed point or periodic cycle) would be more appealing. Title: Re: Sierpinski-like fractals using an iterative function Post by: msltoe on January 29, 2010, 02:47:04 AM Tglad: I agree that there are discontinuities. This may be resolved by smooth averaging over the nearest 3 vertices. Can you explain or show me the forum link to "quadruple covering"?
Timeroot: I think that the fixed point method would be better. When I take a cross-section of the above Sierpinski object, it's filled. I'll look into that... I've been playing around with rotations using the simplest thing I could think of: the non-normalized perpendicular axis (nx,ny,nz) is the cross-product of the vertex-origin and (x,y,z)-origin vectors. Here are two variations using the following formula: x = xv[jmin] -2*x + t*nx; y = yv[jmin] -2*y + t*ny; z = zv[jmin] - 2*z + t*nz; where t=1 and t=2. This is not strictly a rotation but it provides nice results. Title: Re: Sierpinski-like fractals using an iterative function Post by: Tglad on January 29, 2010, 05:32:49 AM Wow, really starting to look interesting msltoe. Do you know whether these fractals are connected?
Quadruple cover just means that, in the area of interest, 4 points will map to 1 point. In the mandelbrot 2 points map to 1. e.g. if Z^2=-1 then Z is -i or i. I think your fractals multi-cover the space anyway. Title: Re: Sierpinski-like fractals using an iterative function Post by: Tglad on January 29, 2010, 10:20:59 AM I don't know how to render with nice colour like your's, but here's a kind of similar fractal.
Quote if (point.x > 1) It reflects a cube around its six faces, then (to add interest) reflects along the diagonal (same as rotating 180 around the diagonal in fact), then scales.point.x = 2 - point.x elseif (point.x < -1) point.x = -2 - point.x endif if (point.y > 1) point.y = 2 - point.y elseif (point.y < -1) point.y = -2 - point.y endif if (point.z > 1) point.z = 2 - point.z elseif (point.z < -1) point.z = -2 - point.z endif point = point * k Vector diagonal = new Vector(1,1,1) diagonal.Normalise() float dot = point.Dot(diagonal) long.Multiply(corners[0], -2*dot) point = point - 2*diagonal*dot ; now repeat the above point = point + C It is actually continuous and conformal, but doesn't lead to a connected fractal. Pics are for k = 1.5 and 2 Title: Re: Sierpinski-like fractals using an iterative function Post by: kram1032 on January 30, 2010, 11:45:49 AM really nice, all of them :D
Title: Re: Sierpinski-like fractals using an iterative function Post by: M Benesi on February 24, 2010, 05:28:48 AM I altered it a bit (by changing signs at the bottom) and assign a lower minimum radius (1) to get the same fractals. Anyways... it was a total pain to code because allocating arrays kept on crashing me out, so I had to do it the hard way.. or easy way. or whatever: Code: if (fractaltype=="Vertex") { |