WOLFRAM|DEMONSTRATIONS PROJECT

Sampling a Uniformly Random Rotation

​
number of sampled rotations
100
generate random
rotations
perturbations
z
axis rotation
z
axis deflection
The orientation of a sphere is an element of
SO(3)
and can be represented by three Euler angles. However, uniformly sampling three Euler angles does not result in a uniform sampling of
SO(3)
. To generate a uniformly distributed random rotation in
SO(3)
, first perform a random rotation about the
z
axis, then rotate the
z
axis to a random position on the sphere.
We can use this same method to generate uniformly distributed perturbations in
SO(3)
by scaling the
z
axis rotation and deflection by a number less than 1.