The Chaos Game
Trying a square

Previously we generated the Sierpinski Triangle by playing an instance of The Chaos Game.

If we try the same procedure with a square, we would begin with 4 vertices and a starting dot. Then, at each iteration we would place another dot halfway between the previous dot and a randomly chosen vertex.

Unfortunately, this time our approach will produce something like what's shown to the right, a fairly uniform and uninteresting scattering of dots. Blah.

But wait!

Let's not give up on our square just yet. Perhaps the fault lies not with our number of vertices, but in the fraction of distance we travel at each step.

Let r denote this fraction. For example, in the case of the triangle, we put each dot halfway between the previous dot and the chosen vertex. So that's using r = 1/2. Likewise, if we instead put each dot three quarters of the way from the previous dot to the chosen vertex that would be using r = 3/4.

Use the panel below to explore some different r values for 4 vertices. In particular, try something larger than 1/2. You can enter the r values either as fractions, like 3/4, or as decimals, like 0.75. (And this time around, we'll plot the points rather faster than we did for the triangle, and we'll choose one of the vertices as our starting point.)

You can also explore different r values for 5 vertices, 6 vertices, etc. Some combinations produce beautiful results!

Number of vertices =

Distance fraction r =

Plot
Many more r values

Did you discover some good choices for the number of vertices and an r value? I'm especially fond of 8 vertices with r = 0.71 myself. For 6 vertices with r = 0.67 you can see a pattern known as the Koch Snowflake repeated many times.

If you'd like to observe the results of many more r values for a given number of vertices, use the panel below. After selecting the number of vertices, clicking the Play button will display the resulting patterns for a thousand different r values between 0 and 1. These animations give us an idea of which r values produce nice patterns and which ones don't. And, in my opinion, they're beautiful to watch.

Number of vertices =

Play
What else?

Here we've dealt with a problem arising in the case of more than 3 vertices by varying the fractional distance r we use in plotting each dot. But, this isn't the only possibile fix. Another approach is to restrict which vertices are available to be chosen at each step.

Let's explore this approach next!