Pythonkode
import turtle
sc = turtle.Screen()
sc.setup(2000, 1500, startx = 2000)
t=turtle.Turtle()
t.left(90)
t.speed(0)
def kronblad():
t.left(40)
for i in range(16):
t.fd(4)
t.right(5)
t.right(100)
for j in range(16):
t.fd(4)
t.right(5)
t.right(140)
def blomster():
for i in range(5):
kronblad()
t.right(72)
def stripe():
for i in range(10):
blomster()
t.penup()
t.fd(128)
t.pendown()
def tekstil():
t.penup()
t.left(90)
t.fd(900)
t.right(90)
t.back(600)
t.pendown()
for i in range(10):
if i%2==0:
a=1216
else:
a=1344
stripe()
t.penup()
t.right(90)
t.fd(120)
t.left(90)
t.back(a)
t.pendown()
tekstil()
ts = turtle.getscreen()
ts.getcanvas().postscript(file="FlowerPower2.svg")