!header The Chaos Game !text b j Draw a pentagon and a single dot in the center. Now roll a five-sided die to randomly pick one of the vertices of the pentagon and draw a new dot halfway between the first dot and that vertex. Roll the die again, draw a dot halfway between that one and the new vertex, and repeat. If you have a few hundred years on hand, you’ll have a very interesting picture. Depending on the inital polygon drawn, we can get some wild results — see if you recognize the triangle version, for example. Like the Barnsley Fern and the Kicked Rotator, this process, often called the Chaos Game, is an example of an iterated function system, where we repeatedly apply a given function. It differs from examples like the Mandelbrot set, though, in that we’re tracking the movement of one point over time rather than iterating every point individually. !begin-text-boxes num-vertices 5 Vertices grid-size 1000 Image Size !end-text-boxes !begin-text-buttons generate Generate !end-text-buttons !canvas !begin-text-buttons download Download Image !end-text-buttons !footer