How can I make the Python library Turtle, run and draw a square in 1 screen tick?
import turtle as t
import math
def square():
t.penup()
t.goto(cord_x_1, cord_y_1)
t.pendown()
t.goto(cord_x_2, cord_y_2)
t.goto(cord_x_3, cord_y_3)
t.goto(cord_x_4, cord_y_4)
t.goto(cord_x_1, cord_y_1)
t.penup()
t.speed(0)
theta = 0
print("What do you want for angle Θ?")
radians_theta = math.fmod(float(theta), 360)
sqrt = math.sqrt((50)**2+(50)**2)
while 2 > 1:
radians_theta = math.fmod(float(theta), 360)
#cord setup
cord_x_1 = sqrt * math.cos(radians_theta)
cord_y_1 = sqrt * math.sin(radians_theta)
cord_x_2 = sqrt * math.cos(radians_theta + math.radians(90))
cord_y_2 = sqrt * math.sin(radians_theta + math.radians(90))
cord_x_3 = sqrt * math.cos(radians_theta + math.radians(180))
cord_y_3 = sqrt * math.sin(radians_theta + math.radians(180))
cord_x_4 = sqrt * math.cos(radians_theta + math.radians(270))
cord_y_4 = sqrt * math.sin(radians_theta + math.radians(270))
#repeat
t.clear()
square()
theta += 30
theta = theta % 360
print(theta)
What I'm wanting is to have the turtle draw the rotated square very fast. I tried setting the speed to 0, but that is not fast enough. Does anyone know how I could speed turtle up?