Assignment #7: The Koch Snowflake


It's getting colder outside. Since CIS68 always adjusts to the seasons, you have to draw a snowflake. How Beautiful that is! Here's the picture of what you should generate, called the Koch Snowflake:

Since we've talked a lot about the program in class already, i'll not give you any further details, but just the order to program the Koch Snowflake RECURSIVELY using the code given below as a base. The code covers all the geometry you need, look at it and you will understand. Just add some lines of code to create the snowflake.

The program version that generated the output above added 11 lines of code to the source you get. Hence, after understanding what's recursion, this should make clear that recursion makes your life easier. Btw.: the stopping criterion for the output above was 'segment length < 5'.

good luck !

Here's the code