def calc_coord(self, transCoord, p, d, a, e, i, w):
# cx, cy, cz ?? ??
# p, ?? d, ?? ??
# a ??, e ???
# i ?? ???
unitAng = 360/p
ang = (unitAng * d) % 360
theta = np.deg2rad(ang)
b = a * np.sqrt(1 - np.power(e, 2))
x = transCoord[0] + a * np.cos(theta)
y = transCoord[1] + b * np.sin(theta)
z = 0.0
#rotate
w = np.deg2rad(w)
x1, y1 = x, y
#x = transCoord[0] + (x1 * np.cos(w) - y1 * np.sin(w))
#y = transCoord[1] + (x1 * np.sin(w) + y1 * np.cos(w))
coord = [x, y, z]
return coord
评论列表
文章目录