def alpha_angle(pivot=None, com=None, axis=None): """Calculate and return the rotor alpha angle.""" # The CoM-pivot axis. com_piv = com - pivot com_piv /= norm(com_piv) # The mu_xy vector. z_axis = array([0, 0, 1], float64) mu_xy = cross(z_axis, com_piv) mu_xy /= norm(mu_xy) # The alpha angle. return vector_angle(mu_xy, axis, com_piv)