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