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:
Post a Comment