A spirograph created by 15 trapezoids stamped as images of a rotating figure. The Python Turtle code uses a loop. The "normal" orientation of the turtle in this case is facing the first side of the last trapezoid drawn.
Please feel free to copy and paste the following code. Ask questions if you have any, and subscribe. Enjoy!!
import turtle
scrin = turtle.Screen()
scrin.bgcolor("light green")
t = turtle.Turtle()
t.pensize(5)
t.speed(3)
for i in range(15): #draw 15 trapezoids, 24 degrees apart
t.color("blue")
t.forward(250)
t.left(120)
t.color("black")
t.forward(100)
t.left(60)
t.color("red")
t.forward(150)
t.left(60)
t.color("blue")
t.forward(100)
t.left(144) #new_trapezoid: rotate turtle 120 + 24 degrees
scrin.exitonclick()
On this page of the site you can watch the video online Python Turtle Code: Rotating Trapezoid with a duration of hours minute second in good quality, which was uploaded by the user Basic Python Turtle Art 07 February 2022, share the link with friends and acquaintances, this video has already been watched 210 times on youtube and it was liked by 2 viewers. Enjoy your viewing!