skrobot.coordinates.math.random_rotation

skrobot.coordinates.math.random_rotation()[source]

Generates a random 3x3 rotation matrix.

Returns:

rot – randomly generated 3x3 rotation matrix

Return type:

numpy.ndarray

Examples

>>> from skrobot.coordinates.math import random_rotation
>>> random_rotation()
array([[-0.00933428, -0.90465681, -0.42603865],
      [-0.50305571, -0.36396787,  0.78387648],
      [-0.86420358,  0.2216381 , -0.4516954 ]])
>>> random_rotation()
array([[-0.6549113 ,  0.09499001, -0.749712  ],
      [-0.47962794, -0.81889635,  0.31522342],
      [-0.58399334,  0.5660262 ,  0.58186434]])