Koch Snowflake

Tim points out that we are missing an "On this page" here. --MF, 5/23/20

PG: Koch and Lévi are related and give practice with each other. I love them both, and they do "teach" something new, but I feel (again) like we're doing more of a survey of fractals than learning about recursion. I'd have to work through more carefully, but I feel like we're rushing to "cover" the field.

The ch in Koch is like ch in Bach, or the Spanish pronunciation of x in Mexico or Xavier, or the j in Alejandra, or like the Yiddish pronunciation of ch in chutzpah.

This fractal is called the Koch snowflake:
Koch snowflake animation levels 1 to 6

The Koch snowflake consists of three copies of the Koch curve, arranged along the sides of a triangle:
Koch snowflake with triangle inscribed

Unlike tree and triangle fractal, this one does not return the sprite to the same place after each recursive call. It replaces a straight line with a bent line.
one side of Koch snowflake

The base case is just the line:
Koch snowflake level 1: just a straight line segment

At the next level, the straight line is replaced by four lines, each one third the length of the parent, arranged this way.
Koch snowflake level 2: segment broken with an equilateral triangle in the middle third.
Each new level replaces the straight lines of the previous level with bent lines, exactly the same way.

The red color was added here to make the previous level more visible. Your version can be all one color.
Koch snowflake level 3: each segment broken with an equilateral triangle in the middle third.
Koch snowflake level 4: each segment broken with an equilateral triangle in the middle third.
Koch snowflake level 5: : each segment broken with an equilateral triangle in the middle third.

  1. Complete this recursive procedure to draw one side of the Koch snowflake.
    Koch curve level:(level#) size:(size#){if( ){move (size) steps} else{Koch curve level:() size:(); turn counterclockwise(60) degrees; ......}}
  2. When you get one side of the snowflake working, combine three of them to make the entire snowflake.
  3. Talk with Your Partner Why does the size in each recursive call have to be one third the size of the previous level? There are four copies; why not one fourth the size?
  1. These pictures are closely related to the Koch curve. See if you can generate pictures like these by changing the turning angles.
    Koch curve-like drawing 1 Koch curve-like drawing 2