The Chaos Game
Let's play a game.

Suppose we are given the vertices of a triangle; call them A, B and C.

We then pick a starting point anywhere on the page (whether inside or outside the triangle doesn't matter) and place our first dot there.

To place the next dot, we randomly choose one of the vertices, let's say B in this case, and put the second dot halfway between our starting dot and B.

Then, we again randomly choose a vertex, let's say C this time, and put the third dot halfway between the second dot and C.

We proceed likewise for the fourth dot and so on.

Question:

Assuming we continue like this, at each step randomly selecting a vertex and placing the next dot halfway between that vertex and the previous dot, what will the result look like?

Will it be a scattered mess of dots, or will some sort of pattern emerge?

Give it a try.

To find out, click anywhere in the image below to select your starting point, and then click the Plot button below to plot a few thousand dots.

Click the Clear button to reset the board if you want to try a different starting point.

Plot
Clear
Wow!

An amazing result, isn't it?

Depending on your starting point, there may be a few dots lying outside the eventual pattern (known as the Sierpinski triangle).

But if your starting point lies within this pattern, such as at one of the three vertices, there will be none of these stray dots.

And no matter where you start, you get the same pattern in the end. Amazing!

What else?

This is an example of what is called "The Chaos Game." And, if you've made it this far, I hope you're asking some questions about how else we might play this game. When I showed this to my kids, the first thing they asked was "Does it also work with a square?"

Well, let's find out!