pymerlin.utils.rotmat_versor

pymerlin.utils.rotmat_versor(versor)[source]

Calculates rotation matrix based on a versor. If length 3, assuming only vector part and will calculate 4th element to make magnitude 1.

Parameters

versor (array) – 3 or 4 element versor

Returns

3x3 rotation matrix

Return type

array