TOPICS
Search

Hypersphere Point Picking


Marsaglia (1972) has given a simple method for selecting points with a uniform distribution on the surface of a 4-sphere. This is accomplished by picking two pairs of points (x_1,x_2) and (x_3,x_4), rejecting any points for which x_1^2+x_2^2>=1 and x_3^2+x_4^2>=1. Then the points

x=x_1
(1)
y=x_2
(2)
z=x_3sqrt((1-x_1^2-x_2^2)/(x_3^2+x_4^2))
(3)
w=x_4sqrt((1-x_1^2-x_2^2)/(x_3^2+x_4^2))
(4)

have a uniform distribution on the surface of the hypersphere. This extends the method of Marsaglia (1972) for sphere point picking, but unfortunately does not generalize to higher dimensions.

An easy way to pick a random point on a hypersphere of arbitrary dimension is to generate n Gaussian random variables x_1, x_2, ..., x_n. Then the distribution of the vectors

 1/(sqrt(x_1^2+x_2^2+...+x_n^2))[x_1; x_2; |; x_n]
(5)

is uniform over the surface S^(n-1) (Muller 1959, Marsaglia 1972).


See also

Hypersphere, Sphere Point Picking

Explore with Wolfram|Alpha

References

Hicks, J. S. ad Wheeling, R. F. "An Efficient Method for Generating Uniformly Distributed Points on the Surface of an n-Dimensional Sphere." Comm. Assoc. Comput. Mach. 2, 13-15, 1959.Marsaglia, G. "Choosing a Point from the Surface of a Sphere." Ann. Math. Stat. 43, 645-646, 1972.Muller, M. E. "A Note on a Method for Generating Points Uniformly on N-Dimensional Spheres." Comm. Assoc. Comput. Mach. 2, 19-20, Apr. 1959.

Referenced on Wolfram|Alpha

Hypersphere Point Picking

Cite this as:

Weisstein, Eric W. "Hypersphere Point Picking." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/HyperspherePointPicking.html

Subject classifications