I would like to create randomly oriented planes. This is how I'm attempting to do that:
- I create a 2 random unit vectors, $\mathbf{v}_1$, and $\mathbf{v}_2$, in the $x$-$y$ plane
- I assume that if I rotate these two vectors around a random vector (in $x$-$y$-$z$) called $\mathbf n$, the plane on which the two vectors lie is random and uniformly distributed over the sphere.
- So I randomly pick $\mathbf n$, keeping in mind the issues of random point picking on spheres.
- I then use
RotationMatrix[α, n].v1
(and same forv2
) to get the new vectors on the rotated and supposedly random plane. There is some question on what to choose for the angle $\alpha$ which gives the angle of the rotation.- If I choose $\alpha<\pi/2$, the vectors do not encompass the entire sphere.
- If I choose $\alpha=\pi/2$, I get a bunching of vectors at the poles.
- If I choose $\alpha>\pi/2$, there is bunching at various latitudes. I cannot get a uniformly random distribution over the sphere!
Is there a fix to the current method I am implementing? Is there another way to do it?
My real goal here isn't creating random planes. My goal is to take two vectors with some arbitrary magnitude and direction in $x$-$y$ and then randomly orient them over the sphere while maintaining their relative positions with respect to one another. The steps I have taken above seem like the logical way to do that.