Homework 6

Out: Tue, 21 Nov 2000
Due: Tue,  1 Dec 2000

This assignment is meant to exercise your understanding of recursion. You are to write a program to draw the recursively defined Koch Snowflake.

Programming:

The drawing of the snowflake is described recursively. given two points, p and q, a snowflake of depth 0 from p to q is a line from p to q. If the depth is greater than 0:
  1. Divide the segment from p to q into three equal parts.
  2. Replace the middle third with two parts, each equal in length to the third removed, and buckled upwards to make them fit.
  3. On each of the four parts, build a snowflake of depth one less.
See the applet below for an example of this construction.

The Koch Snowflake Applet