Loading design...

A beautiful fractal tree created with Python Turtle. Read the code below, copy it, and try it in your own Python environment.
from turtle import *
import colorsys
tracer(10)
bgcolor('black')
pensize(2)
left(90)
up()
goto(0, -200)
down()
def draw_tree(length):
if length < 5:
return
else:
h = 0.3 - (length / 200) * 0.3
color(colorsys.hsv_to_rgb(h, 1, 1))
forward(length)
right(25)
draw_tree(length * 0.75)
left(50)
draw_tree(length * 0.75)
right(25)
backward(length)
draw_tree(100)
done()