Back to Index

Chaos Game

Chaos game is a mechanism for generating an approximation of a fractal. You determine the vertices of a polygon, and then randomly generate a point inside of that polygon.

For an arbitrary number of steps, you move the point halfway between its current location and a randomly chosen vertex. That point is colored in, and you repeat the process as much as desired. Some chaos games, known as restricted chaos games, have requirements for a randomly chosen vertex's relation to the previous one.

If you want to make chaos games with custom shapes, go here.

Click on a square to begin the chaos game for that pattern, and click on it again to stop it.

Triangle, No Rules

The fractal that this approaches is the Sierpinski Triangle, which has a cleaner render here.

Square, No Vertex Twice in a Row

If the chaos game is played with a square with no rules, the entire space will be filled up. For a meaningful fractal to be established, rules must be set.

Square, No Diagonal Vertices

Pentagon, No Rules

Pentagon, No Vertex Twice in a Row

Pentagon, No Vertices Immediately Clockwise

Pentagon, No Vertices Immediately Adjacent

Pentagon, No Vertices Two Away