Skip to content

Instantly share code, notes, and snippets.

@tef
Created August 13, 2013 13:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tef/6221100 to your computer and use it in GitHub Desktop.
Save tef/6221100 to your computer and use it in GitHub Desktop.
from turtle import *
def curve(depth, length, angle):
if depth == 0:
if angle > 0:
pencolor('green')
else:
pencolor('blue')
forward(length)
else:
curve(depth -1, length, -angle)
right(angle)
curve(depth -1, length, angle)
right(angle)
curve(depth -1, length, -angle)
speed(0)
shape("turtle")
width(3)
curve(6, 5, 60)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment