Musings of a Recovering Lutheran: Stumbling through mathematics: The chaos game (Part 2)
I heard the voice of the Lord, saying, 

Whom shall I send, and who will go for us?

Then said I, Here am I; send me.

Isaiah 6:8 (KJV)

Saturday, June 29, 2013

Stumbling through mathematics: The chaos game (Part 2)

This is a followup to an earlier post. Again, the basis is the Chaos Game which is as follows: plot a point inside a regular n-gon (a polygon with n number of sides). Then plot a second point by calculating the distance between the original point and a vertex picked at random, and plotting the second point some fixed percentage of that distance towards the vertex. Repeat this process for as many points as you wish.

I wrote another Matlab program using the corners of a regular pentagon as the vertices and letting the percentage be 1/3. For 1000 points the result was following plot:

For 10,000 points:

For 50,000 points:

The plot is a fractal similar to the SierpiƄski Sieve.

No comments: