I want to get a random 2D slice from a 3D volume in a computer program for generating noise. I decided to use a rotation matrix, which I understand has to be a member of the rotation group SO(3). How can I create a uniformly random member of this group?
Share
Choose three random values u1, u2, and u3 between 0 and 1.
A uniform random quaternion is given by:
w = sqrt(1 – u1)sin(2pi*u2)
x = sqrt(1 – u1)cos(2pi*u2)
y = sqrt(u1)sin(2pi*u3)
z = sqrt(u1)cos(2pi*u3)
You can then generate the appropriate rotation matrix using this formula: