from plotter_turtle import Turtle

DEPTH = 4


def koch(t, length, depth):
    if depth == 0:
        t.forward(length)
        return
    for turn in (60, -120, 60, 0):
        koch(t, length / 3, depth - 1)
        t.left(turn)


t = Turtle()

for side in range(3):
    koch(t, 300, DEPTH)
    t.right(120)

t.save("koch.svg")
