tr2angvec
Convert rotation matrix to angle-vector form
[THETA,V] = TR2ANGVEC(R, OPTIONS) is rotation expressed in terms of an angle THETA (1×1) about the axis V (1×3) equivalent to the orthonormal rotation matrix R (3×3).
[THETA,V] = TR2ANGVEC(T, OPTIONS) as above but uses the rotational part of the homogeneous transform T (4×4).
If R (3×3× K) or T (4×4× K) represent a sequence then THETA (K×1)is a vector of angles for corresponding elements of the sequence and V (K×3) are the corresponding axes, one per row.
Options
'deg' | Return angle in degrees (default radians) |
Notes
- For an identity rotation matrix both
THETAandVare set to zero. - The rotation angle is always in the interval [0 pi], negative rotation is handled by inverting the direction of the rotation axis.
- If no output arguments are specified the result is displayed.