I need to efficiently rotate a 2D (and 3D) vector in a CUDA kernel. I was thinking about generating random unitary rotation matrices. I don't need to know the angle, it just has to be randomly distributed.
Is there some clever way to avoid the computational complexity of the division and the square root for the norm? Or another way to rotate a vector?
I need this for a 2D GPU off-lattice Monte-Carlo simulation, but a 3D solution would be nice too.
Thanks in advance.