Created
August 13, 2013 13:32
-
-
Save tef/6221100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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