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(2)
- t.shape('turtle')
- def pol2dec(r: float, phi: float) -> tuple:
- x = r * cos(phi)
- y = r * sin(phi)
- point = (x, y)
- print("point= ", point)
- return point
- vMin = 1
- vMax = 200
- radius, radius_inc = 0, 0.5
- angle, angle_inc = 0, 2 * pi / 20
- for vc in range(vMin, vMax + 1):
- radius += radius_inc
- angle += angle_inc
- t.goto(*pol2dec(radius, angle))
Advertisement
Add Comment
Please, Sign In to add comment