Python Turtle - Spiral Animation

Published: 21 October 2020
on channel: Kaige Liao (Coach Leo)
1,716
50

import turtle
import time

turtle.setup(600, 600)
turtle.bgcolor("#08203D")
leo = turtle.Turtle()
leo.pencolor("DeepSkyBlue")
leo.speed(0)


def spiral():
for i in range(360):
leo.forward(i * 3)
leo.right(121)


def spin(d):
leo.penup()
leo.home()
leo.left(d * n)
leo.down()


try:
n = 0
while True:
turtle.tracer(0)
leo.clear()
spin(-5)
spiral()
n += 1
turtle.update()
time.sleep(0.01)
except:
print("Exit")


On this page of the site you can watch the video online Python Turtle - Spiral Animation with a duration of hours minute second in good quality, which was uploaded by the user Kaige Liao (Coach Leo) 21 October 2020, share the link with friends and acquaintances, this video has already been watched 1,716 times on youtube and it was liked by 50 viewers. Enjoy your viewing!