forked from extern/python-malbuch
Add new file
This commit is contained in:
parent
1b19570a15
commit
53811c7c11
33
Mandala 2
Normal file
33
Mandala 2
Normal file
@ -0,0 +1,33 @@
|
||||
## Code mit spazierender Schildkröte
|
||||
|
||||
from turtle import *
|
||||
shape("turtle")
|
||||
speed(100)
|
||||
for i in range(24):
|
||||
for i in range(4):
|
||||
forward(250)
|
||||
left(120)
|
||||
right(45)
|
||||
for i in range(8):
|
||||
right(90)
|
||||
forward(45)
|
||||
left(45)
|
||||
done()
|
||||
|
||||
## Code für das Erstellen von einer svg Datei
|
||||
|
||||
from svg_turtle import SvgTurtle
|
||||
t = SvgTurtle(1000, 1000)
|
||||
|
||||
|
||||
for i in range(24):
|
||||
for i in range(4):
|
||||
t.forward(250)
|
||||
t.left(120)
|
||||
t.right(45)
|
||||
for i in range(8):
|
||||
t.right(90)
|
||||
t.forward(45)
|
||||
t.left(45)
|
||||
|
||||
t.save_as('PyTurtle2.svg')
|
Loading…
Reference in New Issue
Block a user