Can I find a specific function in Numpy or Scipy to generate a random N dimensional rotation matrix (or orthogonal matrix)? I need to move a vector on an ND sphere to another random point on this sphere.
https://math.stackexchange.com/questions/442418/random-generation-of-rotation-matrices
This may answer your question, at least as far as the strategy goes. As far as I know, there is no standard or library function from numpy that will do precisely what you need. A myriad of computational strategies are presented there, but I would prefer an extension of the quaternion approach since it can preserve a uniform distribution, which is what I'm assuming you're after.
EDIT: My original answer stated "roughly uniform," whereas after a bit more research I found that the quaternion approach, when sampled from a uniform distribution, will in fact preserve a uniform distribution in the rotations.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With