pyCGM_Single.pyCGM.getangle¶
-
pyCGM_Single.pyCGM.
getangle
(axisP, axisD)¶ Normal angle calculation.
This function takes in two axes and returns three angles and uses the inverse Euler rotation matrix in YXZ order.
Returns the angles in degrees.
As we use arc sin we have to care about if the angle is in area between -pi/2 to pi/2
- Parameters
- axisPlist
Shows the unit vector of axisP, the position of the proximal axis.
- axisDlist
Shows the unit vector of axisD, the position of the distal axis.
- Returns
- anglelist
Returns the gamma, beta, alpha angles in degrees in a 1x3 corresponding list.
Examples
>>> import numpy as np >>> from .pyCGM import getangle >>> axisP = [[ 0.04, 0.99, 0.06], ... [ 0.99, -0.04, -0.05], ... [-0.05, 0.07, -0.99]] >>> axisD = [[-0.18, -0.98, -0.02], ... [ 0.71, -0.11, -0.69], ... [ 0.67, -0.14, 0.72 ]] >>> np.around(getangle(axisP,axisD), 2) array([-174.82, -39.26, 100.54])