TOPICS
Search

Sphere Line Picking


Sphere line picking is the selection of pairs of points corresponding to vertices of a line segment with endpoints on the surface of a sphere. n random line segments can be picked on a unit sphere in the Wolfram Language using the function RandomPoint[Sphere[], {n, 2}].

Pick two points at random on a unit sphere. The first one can be placed at the north pole, i.e., assigned the coordinate (0, 0, 1), without loss of generality. The second point is then chosen at random using sphere point picking, and so can be assigned coordinates

x=sqrt(1-u^2)costheta
(1)
y=sqrt(1-u^2)sintheta
(2)
z=u
(3)

with u in [-1,1] and theta in [0,2pi). The distance l between first and second points is then

 l=sqrt(x^2+y^2+(z-1)^2)=sqrt(2-2u),
(4)

and solving for u gives

 u=1/2(2-l^2).
(5)

Now the probability function P_l for distance is then given by

 P_ldl=P_u|(partialu)/(partiall)|dl=1/2ldl
(6)

(Solomon 1978, p. 163), since P_u=1/2 and du/dl=-l. Here, l in [0,2].

SphereLines

Therefore, somewhat surprisingly, large distances are the most common, contrary to most people's intuition. A plot of 15 random lines is shown above. The raw moments are

 mu_n^'=<l^n>=int_0^2l^nP_ldl=(2^(n+1))/(2+n),
(7)

giving the first few as

mu_1^'=4/3
(8)
mu_2^'=2
(9)
mu_3^'=(16)/5
(10)
mu_4^'=(16)/3
(11)

(OEIS A084623 and A000265). Values of n for which mu_n^' are integers are therefore n=0, 2, 6, 14, 30, 62, 126, 254, 510, 1022, ... (OEIS A000918), which are precisely the values n=2^k-2.

The central moments are

mu=4/3
(12)
mu_2=2/9
(13)
mu_3=-8/(135)
(14)
mu_4=(16)/(135),
(15)

so the variance, skewness and kurtosis excess are

sigma^2=2/9
(16)
gamma_1=4/5sqrt(2)
(17)
gamma_2=-5/3
(18)

(Solomon 1978, p. 163).


See also

Ball Line Picking, Circle Line Picking, Line Line Picking, Sphere Point Picking, Sphere Tetrahedron Picking

Explore with Wolfram|Alpha

References

Sloane, N. J. A. Sequences A000265/M2222, A000918/M1599, and A084623 in "The On-Line Encyclopedia of Integer Sequences."Solomon, H. Geometric Probability. Philadelphia, PA: SIAM, 1978.

Referenced on Wolfram|Alpha

Sphere Line Picking

Cite this as:

Weisstein, Eric W. "Sphere Line Picking." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SphereLinePicking.html

Subject classifications