Hypersphere point picking is the selection of points from a uniform distribution on a hypersphere. Marsaglia (1972)
gives a simple method for the unit hypersphere
in four-dimensional Euclidean space. Draw two
independent pairs
and
uniformly from the square
.
Resample either pair if its squared distance from the
origin is at least 1, and resample the second pair if
.
Then the points
|
(1)
| |||
|
(2)
| |||
|
(3)
| |||
|
(4)
|
have a uniform distribution on . This extends Marsaglia's (1972) method for sphere
point picking.
For arbitrary dimension, generate independent and identically distributed random variables ,
,
...,
with a standard normal distribution. The normalized
vector
|
(5)
|
has a uniform distribution on (Muller 1959, Marsaglia 1972).
Schnabel and Janke (2022, p. 2) give a generalization based on ordered disk samples. For
with
,
draw
independent pairs
uniformly from the unit disk,
rejecting zero radii and boundary
points. Sort the whole pairs so that
, where
, and set
. The coordinates
|
(6)
|
for ,
...,
give a uniform distribution on
. For odd
, generate a point in
dimensions and normalize its first
coordinates.