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(50)
bgcolor("black")
hideturtle()
left(90)
def draw_branch(length):
if length < 5:
return
hue = (length / 100) * 0.3
rgb = colorsys.hsv_to_rgb(hue, 0.8, 0.9)
color(rgb)
width(length / 10)
forward(length)
right(25)
draw_branch(length * 0.75)
left(50)
draw_branch(length * 0.75)
right(25)
backward(length)
penup()
goto(0, -200)
pendown()
draw_branch(120)
done()