n = 10**6 r = 10**8 ans = [] ans.append([r, 0]) import math for i in range(1, n): a,b = ans[0] d_rad = math.radians((360 * i)/n) a_rotated = a * math.cos(d_rad) - b * math.sin(d_rad) b_rotated = a * math.sin(d_rad) + b * math.cos(d_rad) ans.append([a_rotated, b_rotated]) for a,b in ans: print(a,b)