Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from turtle import Turtle
- from numpy import cos, sin, pi
- t = Turtle()
- t.speed(1)
- t.shape('turtle')
- def jump2next(pt: tuple):
- t.penup()
- t.goto(pt)
- t.pendown()
- vMin = 1
- vMax = 23
- radius = 40
- angle, angle_inc = 3 * pi / 2, pi / 10
- for j in range(vMin, vMax + 1):
- if j == 1:
- x0 = radius * cos(angle)
- y0 = radius * sin(angle)
- jump2next((x0, y0))
- else:
- angle += angle_inc
- x = radius * cos(angle)
- y = radius * sin(angle)
- x += x0
- y += y0
- print("x = ", x)
- print("y = ", y)
- print("==============================")
- t.goto(x, y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement