## Vi Hart, Sierpinski, and the Chaos Game

*August 15, 2013 at 9:48 pm* *
2 comments *

My kids love to spend the last 20 minutes before lights out doing math with daddy. Often, as an alternative to reading another chapter from the *Magic Treehouse* series, they will ask, “Can we do bedtime math tonight?”

Unfortunately, the materials at Bedtime Math quickly lost their luster — if not for Alex and Eli, at least for me. The problems are based on current events, but they are little more than traditional textbook exercises. Sorry, that’s just not the math to which I’d like my sons to be exposed.

So instead, I’ve been developing my own ad hoc bedtime math curriculum. Last night’s lesson was the Binary Trees video from Vi Hart’s Math Doodling series.

For 3 minutes, 48 seconds, the video had the boys’ rapt attention. When it ended, Eli turned to me. “Well, *that was pretty cool*,” he said.

This afternoon, we explored an extension.

- Draw equilateral triangle
*ABC*, any size you choose, on a sheet of paper. - Randomly pick a point
*Q*on the same sheet of paper. - Now, randomly pick a vertex
*A*,*B*, or*C*, and place a dot at the midpoint of the segment that connects*Q*to that vertex. (But don’t draw the segment. That’ll just make things messy.) - Again, randomly pick a vertex
*A*,*B*, or*C*, and place a dot at the midpoint of the segment that connects the previous point to that vertex. - Repeat Step 4 thousands of times, or at least enough times to see a pattern emerge.

We played this game for a little while using a 12-sided die to determine the randomly selected vertex. A roll of 1-4 chose *A*, 5-8 chose *B*, and 9-12 chose *C*. Interest was starting to wain after 20 rolls, so we paused for a question:

Notice that most of the points occurred within the triangle. If we continue rolling and drawing points, do you think any more points will occur outside the triangle?

The answer is **no**. All points will occur within the triangle.

If you haven’t seen this game before, it’s called the Chaos Game. And if you don’t have interest in rolling a die 2,496 times to see what happens, you can open the Chaos Game spreadsheet. The values in column B are the *x*-coordinates of the points, and the values in column C are the *y*-coordinates. Change the values in B1 and C1 to pick a new starting point, and hit F9 on a PC or fn+F9 on a Mac to generate a new set of data.

Cool, huh?

Entry filed under: Uncategorized. Tags: Chaos Game, fractal, random, Sierpinski, Vi Hart.

1.xander | August 16, 2013 at 10:37 amOh, that is nifty. I can’t believe that I have never seen the Chaos Game before. Time to pull out Barnsley and read those chapters. Thank you for sharing. 😉

2.venneblock | August 18, 2013 at 8:32 pmFirst shown to me by a grad student when I was an undergrad at Penn State. He had just seen it at a conference, and he showed me a simulation of it on a TI-93. It kinda blew me away (except for the pixelated images on the TI calc… thank goodness they’ve improved the resolution of those… oh, wait…).