Uniform Random Rotations

Publisher Summary A planar rotation can be represented in several ways—for example, as an angle between 0 and 2π or as a unit complex number x + iy = cos θ + i sin θ. Planar rotations combine by summing their angles modulo 2π ; so one way to generate a uniform planar rotation is to generate a uniform angle. This chapter describes a uniformly distributed spatial rotation as one not having a uniformly distributed angle. For a unit quaternion, the ω component is the cosine of half the angle of rotation. When the angle is uniformly distributed between 0 and 2π, the average magnitude of ω will be 2/π 0.6366, which exceeds the correct value for a uniform rotation by a factor of 3/2. It is easy to generate random unit quaternions and, hence, rotations with the correct distribution. Pairs of independent variables with Gaussian distribution can easily be generated using the polar or Box–Muller method, which transforms a point uniformly distributed within the unit disk. The Gaussian generation can be folded into the unit quaternion generation to give an efficient algorithm.