答案 0 :(得分:0)
好吧,这是python中的解决方案:
def diagonal_calc(row):
#parameters I have
R = 1/(row.lw_ratio)
X = row.x_size
Y = row.y_size
#calculations
#find alpha:
equation1 = (((X/Y)*R)-1) / (R-(X/Y))
alpha = math.degrees(math.tan(equation1))
#find sides:
sin_alpha = R*math.sin(np.deg2rad(alpha))
cos_alpha = math.cos(np.deg2rad(alpha))
L_side = X/((R*sin_alpha) + cos_alpha)
RL_side = R*L_side
return alpha, L_side, RL_side