Hey I'm very new to the programming world, and what i am trying to do is produce a Koch Snowflake via turtle from python2.5.
this is what I have so far...
from turtle import *
def snowflake(lengthSide, levels):
if levels == 0:
return forward(lengthSide), right(120), forward(lengthSide), right(120), forward(lengthSide)
forward(lengthSide)
left(60)
forward(lengthSide)
right(60)
right(60)
forward(lengthSide)
left(60)
forward(lengthSide)
right(120)
snowflake(lengthSide, levels)
as you can see i've only solved for levels 0 and 1... the problem is i dont understand how to recursively redraw it from a certain location. If anyone has any ideas or tip, it would be helpful.