Cartesian coordinate calculations for a friend

Number Angle Inner circle Outer circle Centre of outer circle 0 0 (250.5, 0.0) (325.5, 0.0) (376.0, 0.0) 1 36 (202.7, 147.2) (263.3, 191.3) (304.2, 221.0) 2 72 (77.4, 238.2) (100.6, 309.6) (116.2, 357.6) 3 108 (-77.4, 238.2) (-100.6, 309.6) (-116.2, 357.6) 4 144 (-202.7, 147.2) (-263.3, 191.3) (-304.2, 221.0) 5 180 (-250.5, 0.0) (-325.5, 0.0) (-376.0, 0.0) 6 216 (-202.7, -147.2) (-263.3, -191.3) (-304.2, -221.0) 7 252 (-77.4, -238.2) (-100.6, -309.6) (-116.2, -357.6) 8 288 (77.4, -238.2) (100.6, -309.6) (116.2, -357.6) 9 324 (202.7, -147.2) (263.3, -191.3) (304.2, -221.0)

The Python 3 script:

import numpy as np

def pol2cart(rho, phi): # Returns the Cartesian coordinates (i.e. X and Y) from a polar vector. x = rho * np.cos(phi) y = rho * np.sin(phi) return(x, y)

# Print the table header print('Number\t\tAngle\t\tInner circle\t\tOuter circle\t\tCentre of outer circle')

# Print each row of data. Each row consists of data for a single 'arm' of the SBC # logo ( https://sunbeam.city ) and the inner / outer circle data represents the # relevant points on the inner / outer circles to create circles and lines joining them. for i in range(10): angle = i * 36 innerCircle = pol2cart(250.5, np.radians(angle)) outerCircle = pol2cart(325.5, np.radians(angle)) outerCircleCentre = pol2cart(376.0, np.radians(angle)) innerCircle = (round(innerCircle[0], 1), round(innerCircle[1], 1)) outerCircle = (round(outerCircle[0], 1), round(outerCircle[1], 1)) outerCircleCentre = (round(outerCircleCentre[0], 1), round(outerCircleCentre[1], 1)) print('%i\t\t%i\t\t%s\t\t%s\t\t%s' %(i, angle, str(innerCircle), str(outerCircle), str(outerCircleCentre)))