Logo by mclarekin - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. September 23, 2019, 10:01:41 AM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   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: Sierpinski-like fractals using an iterative function  (Read 8054 times)
0 Members and 1 Guest are viewing this topic.
msltoe
Iterator
*
Posts: 187


« 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.


* dodec1.png (247.86 KB, 400x400 - viewed 3095 times.)

* dodec1.closeup1.png (407.11 KB, 400x400 - viewed 3091 times.)
« Last Edit: January 26, 2010, 02:57:51 PM by msltoe, Reason: added \"unity-normalized\" » Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #1 on: January 26, 2010, 03:40:56 PM »

nice cheesy
Logged
msltoe
Iterator
*
Posts: 187


« Reply #2 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.


* mand.ico_sierp_scale.png (157.03 KB, 332x332 - viewed 2925 times.)
Logged
Tglad
Fractal Molossus
**
Posts: 703


WWW
« Reply #3 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
Logged
msltoe
Iterator
*
Posts: 187


« Reply #4 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
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #5 on: January 28, 2010, 07:01:50 PM »

a Mandelbrot-style sierpinsky thingy cheesy that's actually pretty interesting, smiley
Logged
Tglad
Fractal Molossus
**
Posts: 703


WWW
« Reply #6 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...
Logged
Timeroot
Fractal Fertilizer
*****
Posts: 362


The pwnge.


WWW
« Reply #7 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.
Logged

Someday, man will understand primary theory; how every aspect of our universe has come about. Then we will describe all of physics, build a complete understanding of genetic engineering, catalog all planets, and find intelligent life. And then we'll just puzzle over fractals for eternity.
msltoe
Iterator
*
Posts: 187


« Reply #8 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.


* mand.sierp+cross.jpg (226.19 KB, 561x499 - viewed 816 times.)

* mand.shrub.crop.jpg (192.08 KB, 567x492 - viewed 799 times.)
Logged
Tglad
Fractal Molossus
**
Posts: 703


WWW
« Reply #9 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.
Logged
Tglad
Fractal Molossus
**
Posts: 703


WWW
« Reply #10 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)
                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 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.
It is actually continuous and conformal, but doesn't lead to a connected fractal. Pics are for k = 1.5 and 2


* cube1pt5.jpg (187.46 KB, 766x782 - viewed 770 times.)

* cube2.jpg (141.42 KB, 624x646 - viewed 787 times.)
Logged
kram1032
Fractal Senior
******
Posts: 1863


« Reply #11 on: January 30, 2010, 11:45:49 AM »

really nice, all of them cheesy
Logged
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #12 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") {
rmin=fixedRadius;
   r=sqr(sx)+sqr(sy-0.525731)+sqr(sz-0.850651);
if (r<rmin) {
  rmin=r; sx2=0;sy2=0.525731;sz2=0.850651;
}
   r=sqr(sx)+sqr(sy+0.525731)+sqr(sz-0.850651);
if (r<rmin) {
  rmin=r; sx2=0;sy2=-0.525731;sz2=0.850651;
}
   r=sqr(sx)+sqr(sy-0.525731)+sqr(sz+0.850651);
if (r<rmin) {
  rmin=r; sx2=0;sy2=0.525731;sz2=-0.850651;
}
   r=sqr(sx)+sqr(sy+0.525731)+sqr(sz+0.850651);
if (r<rmin) {
  rmin=r; sx2=0;sy2=-0.525731;sz2=-0.850651;
}
   r=sqr(sx-0.525731)+sqr(sy-0.850651)+sqr(sz);
if (r<rmin) {
  rmin=r; sx2=0.525731;sy2=0.850651;sz2=0;
}
   r=sqr(sx+0.525731)+sqr(sy-0.850651)+sqr(sz);
if (r<rmin) {
  rmin=r; sx2=-0.525731;sy2=0.850651;sz2=0;
}
   r=sqr(sx-0.525731)+sqr(sy+0.850651)+sqr(sz);
if (r<rmin) {
  rmin=r; sx2=0.525731;sy2=-0.850651;sz2=0;
}
   r=sqr(sx+0.525731)+sqr(sy+0.850651)+sqr(sz);
if (r<rmin) {
  rmin=r; sx2=-0.525731;sy2=-0.850651;sz2=0;
}
   r=sqr(sx-0.850651)+sqr(sy)+sqr(sz-0.525731);
if (r<rmin) {
  rmin=r; sx2=0.850651;sy2=0;sz2=0.525731;
}
  r=sqr(sx+0.850651)+sqr(sy)+sqr(sz-0.525731);
if (r<rmin) {
  rmin=r; sx2=-0.850651;sy2=0;sz2=0.525731;
}
  r=sqr(sx-0.850651)+sqr(sy)+sqr(sz+0.525731);
if (r<rmin) {
  rmin=r; sx2=0.850651;sy2=0;sz2=-0.525731;
}
  r=sqr(sx+0.850651)+sqr(sy)+sqr(sz+0.525731);
if (r<rmin) {
  rmin=r; sx2=-0.850651;sy2=0;sz2=-0.525731;
}
if (juliaMode) {
sx=cr+2*sx - sx2;
sy=ci+2*sy - sy2;
sz=cj+2*sz -sz2;
} else {
sx=pixelr+2*sx - sx2;
sy=pixeli+2*sy - sy2;
sz=pixelj+2*sz -sz2;
}
bail=sx^2+sy^2+sz^2;

}


 
Logged

Pages: [1]   Go Down
  Print  
 
Jump to:  


Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

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