PythonClub
Na, wenn das kein schönes Mandala ist... - Druckversion

+- PythonClub (https://pythonclub.bruemmer.net)
+-- Forum: Meine Kategorie (https://pythonclub.bruemmer.net/forum-1.html)
+--- Forum: Python Club (https://pythonclub.bruemmer.net/forum-3.html)
+---- Forum: Python Fragen & Antworten (https://pythonclub.bruemmer.net/forum-7.html)
+---- Thema: Na, wenn das kein schönes Mandala ist... (/thread-5.html)



Na, wenn das kein schönes Mandala ist... - christian - 04.05.2019

Code:
import turtle

turtle.speed(10)
turtle.shape('turtle')
# ein bisschen bewegen
turtle.up()
turtle.home()
turtle.forward(80)
turtle.right(90)
turtle.forward(115)
turtle.left(90)
turtle.down()

# mandala
turtle.color((0, 0, 0.5) )
zaehler = 1
while ( zaehler <= 120 ):
   # turtle.color((0, 0, 0.5 + zaehler / 300 ) )
   turtle.forward(200)
   turtle.left(147)
   zaehler=zaehler + 1

turtle.left(180)
turtle.color(0.5, 0, 0 )
zaehler = 1
while ( zaehler <= 120 ):
   # turtle.color((0.5 + zaehler / 300 ), 0, 0 )
   turtle.forward(300)
   turtle.left(147)
   zaehler=zaehler + 1

turtle.up()
turtle.right(91.2)
turtle.forward(101)
turtle.down()

turtle.color(0, 0.5, 0 )
zaehler = 1
while ( zaehler <= 120 ):
   # turtle.color(0, (0.5 + zaehler / 300 ), 0 )
   turtle.forward(350)
   turtle.left(147)
   zaehler=zaehler + 1

# Ende
[attachment=6]