Python Turtle Code: Rotating Trapezoid

Publicado el: 07 febrero 2022
en el canal de: Basic Python Turtle Art
210
2

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()


En esta página del sitio puede ver el video en línea Python Turtle Code: Rotating Trapezoid de Duración hora minuto segunda en buena calidad , que subió el usuario Basic Python Turtle Art 07 febrero 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 210 veces y le gustó 2 a los espectadores. Disfruta viendo!