Stamped images of an orbiting planet set against a yellow-to-blue gradient.
Feel free to copy and paste the basic Python Turtle code that is given below. Ask questions about the code if you have any. Please enjoy, like, and subscribe! :)
import turtle
t = turtle.Turtle()
screen = turtle.Screen()
screen.tracer(False)
color1 = (1, 1, 0)
color2 = (0, 0, 1)
w, h = screen.window_width(), screen.window_height()
delt = [(red - color1[i]) / h for i, red in enumerate(color2)]
t.color(color1)
t.penup()
t.goto(-w/2, h/2)
t.pendown()
sign = 1
for distance, y in enumerate(range(h//2, -h//2, -1)):
t.forward(w * sign)
t.color([color1[i] + delta * distance for i, delta in enumerate(delt)])
t.sety(y)
sign *= -1
screen.tracer(True)
t.right(113)
rad = 20
for i in range(7):
t.penup()
t.goto(-150, 250)
t.forward(450)
t.fillcolor(1, 1, 1)
t.begin_fill()
t.circle(rad)
t.end_fill()
rad += 5
t.left(rad / 2.6)
t.ht()
screen.exitonclick()
En esta página del sitio puede ver el video en línea Basic Python Turtle Code: Orbit de Duración hora minuto segunda en buena calidad , que subió el usuario Basic Python Turtle Art 31 mayo 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 208 veces y le gustó 1 a los espectadores. Disfruta viendo!