Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # deg2xy.py
- from math import sin, cos, radians
- def deg2xy(angle, r):
- a = radians(angle)
- return (round(sin(a) * r, 9) , round(cos(a) * r, 9))
- n = 1000
- for degrees in range(360):
- x,y = deg2xy(degrees, n)
- print (degrees,x, y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement