Hi; I wasn't sure how to leave a comment, so I'm (ab)using issues ;-)
This page was a great source of reference material; thanks for also including links to primary sources like Marsaglia's paper!
While implementing Marsaglia's random-quat, I noticed that his formula includes p1 / sqrt(d1), which normalizes a random point in the unit circle. This is a roundabout way of generating a random point on the unit circle. An improvement is to generate a point on the unit circle directly:
Point-on-circle requires less work than point-in-circle.
Hi; I wasn't sure how to leave a comment, so I'm (ab)using issues ;-)
This page was a great source of reference material; thanks for also including links to primary sources like Marsaglia's paper!
While implementing Marsaglia's random-quat, I noticed that his formula includes
p1 / sqrt(d1)
, which normalizes a random point in the unit circle. This is a roundabout way of generating a random point on the unit circle. An improvement is to generate a point on the unit circle directly:|p1| ~= 0
singularity.IOW, you can do this and still be correct: