Chaos Game

Chaos Game

2020, Dec 20    

Chaos games are sets of rules used to generate fractals. The rules to generate them are as follows:

  1. Draw several points on a plane.
  2. Choose one point randomly to start at.
  3. Randomly choose another point.
  4. Draw a dot (or pixel) halfway between the current point and the next selected point.
  5. Repeat steps 3 and 4 until the fractal emerges.

This specific rule set generates the Sierpinski triangle. This will work with any type of triangle so the three starting points can be placed anywhere on the plane and still generate the fractal.

The basic ruleset can be modified slightly by changing the distance the pixel is drawn and the number and placement of the starting points.