Loading design...

A beautiful dragon curve created with Python Turtle. Read the code below, copy it, and try it in your own Python environment.
from turtle import *
import colorsys
tracer(100)
bgcolor('black')
pensize(2)
h = 0
def draw(od, lh, dr):
global h
if od == 0:
color(colorsys.hsv_to_rgb(h, 1, 1))
h = (h + 0.005) % 1
fd(lh)
else:
draw(od - 1, lh / 1.414, 1)
rt(90 * dr)
draw(od - 1, lh / 1.414, -1)
pu()
goto(-100, 0)
pd()
lt(90)
draw(12, 200, 1)
done()