[Math] Chaos game attraction patterns

Feel like posting Off Topic? Do it here.

Moderator: MaxCoderz Staff

Post Reply
teoryn
New Member
Posts: 26
Joined: Sat 18 Dec, 2004 4:23 am
Location: Ohio
Contact:

[Math] Chaos game attraction patterns

Post by teoryn »

For my Computer Science class we were to make a program that would 'play' the chaos game (link) of a right triangle (set in code). However, I thought it was an interesting project and went above and beyond, making my program able to handle mouse input of n-sided polygons (n>2) and also normal polygons. I also implemented a variable attract value (notice that how I implemented it is opposite of how mathworld did, to change between there's and mine subract the value from one). Now for some screen shot goodness.

Image
Chaos Game run in a normal triangle with attract .5 (aka Sierpinski's Triangle)

Now, this is good and all, but upon playing with it we discovered some really nifty patterns arise with different attracts on different polygons. One that got investigated quite a bit was the normal hexagon, which when used with attract of 2/3 has the corners just touch each other (like the corners in sierpinski's)

Image

We (my cs teacher and myself) aren't sure if 2/3 is the right attract to get the corners to perfectly touch, but it seems about right. So then we started playing with other polygons, but we discovered it to be very difficult to find the 'perfect' attraction values, such as in this example of a pentagon.

Image
Yes, my MS-Paint skills own all. :D

Notice the small overlap.

So basically I invite everybody to try and figure out what the relation between the number of sides and the attraction is to make the corners touch 'perfectly'. If for testing or just playing you'd like a copy of my program, written in java (let's not complain too much...) and in a jar file with source, just email me and I'll send it to you with some directions on how to use it.

Thanks to ImageShack for Free Image Hosting
You've seen the posts, now see the sites!
http://hiddenuniverse.blogspot.com
http://teoryn.deviantart.com
Post Reply