TITLE: Generate a uniform distribution of orientations
QUESTION [0 upvotes]: I am rendering images of a 3D object and am trying to generate a uniform distribution of orientations for this object. I am unsure of how to do this, and considerations that are necessary to take into account.

Is a uniform distribution of orientations equivalent to a uniform distribution of rotations as apparent to a rendering camera? That is, if I generate uniform orientations, will it look uniform to the camera?
How do I generate a uniform distribution of orientations? Is it possible to generate uniform points on a d-sphere to get a set of rotations? If so, would this mean generating points on a 3D sphere or a 4D hypersphere?

REPLY [1 votes]: One good way to generate a uniformly distributed point on the unit sphere in $\mathbb R^n$ is to take $(Z_1,\ldots,Z_n)$ independent with standard normal distribution, and
divide by the norm $\sqrt{Z_1^2 + \ldots + Z_n^2}$.  To get a uniformly distributed  orthogonal $n \times n$ matrix, take $n^2$ independent standard normal $Z_{ij}$ and orthonormalize by Gram-Schmidt.
{"set_name": "stack_exchange", "score": 0, "question_id": 3960809}