Processing math: 100%

Sunday, March 12, 2017

Optimal sampling and arrangement on an n-sphere

The goal of this post is to create a "good" algorithm for sampling and arranging points on the n-sphere. We find the ϵ-covering number of the n-sphere and arrange the points in a Hamiltonian path of small pairwise consecutive distance. This post relates to several previous posts:
Thanks to Professor Cheng Ouyang for a helpful discussion.
Although rejection sampling is a standard method to sample points uniformly on the n-sphere (sample points uniformly on the (n+1)-cube, check if the norm is less than or equal to 1, if it is, normalize the point to the n-sphere), this is not best for our scenario (the arranging part). A better suited approach is to take a parametrization f from an n-cube into Rn+1 of the unit n-sphere. We use
f : [0,2π]n1×[0,π)Rn+1,(α1,,αn)(cos(α1),sin(α1)cos(α2),sin(α1)sin(αn1)cos(αn),sin(α1)sin(αn1)sin(αn)).
Adapting the main Proposition from the "Sampling points" post, we have following proposition.

Proposition: The probability density function gn:[0,2π]n1×[0,π]R0, defined as
gn(α1,,αn)=n1k=1|sinnk(αk)|2n1πn1k=1π0sinnk(αk) dαk,
is uniform on the natural embedding of the unit n-sphere Sn in Rn+1.

The denominator of gn does not seem to have closed form, though the ratios between consecutive terms are given by the denominators of Γ(+32)/Γ(+22) and !!/(+1)!!, with appropriate powers of π. The first few terms of this sequence are
4π,4π2,323π2,8π3,25615π3,323π4,2048105π4,.
Next, recall the n-surface of an n-sphere and k-volume of a k-ball are
surf(n,r)=2π(n+1)/2rnΓ((n+1)/2),vol(k,r)=πk/2rkΓ((k+2)/2).
Adapting Proposition 3.2 of Niyogi, Smale and Weinberger, similarly to the "Reconstructing a manifold" post, we have the following proposition.

Proposition: A collection of N points sampled uniformly from Sn is ϵ-dense in Sn with certainty 1δ, given
Nsurf(n,1)(1ϵ216)n/2vol(n,ϵ2)log(surf(n,1)δ(1ϵ264)n/2vol(n,ϵ4)). Bauer and Polthier sample points "evenly" on the 2-hemisphere and then connect them with a winding path, which winds around the hemisphere 6 times. Generalizing this approach, suppose we wanted to have a path that wind around the n-sphere times and has a small distance between consecutive vertices of the path. The following algorithm describes one way of doing this.

Algorithm: SpherePathFinder
Input: Positive integers n, and real numbers ϵ,δ(0,1)
Output: A path on Sn that winds around times, whose vertices are ϵ-dense on Sn with certainty 1δ

Sample N points on [0,2π]n1×[0,π] according to gn in a set X
Initiate an empty path P=()
for kn{1,,}:
    for kn1{1,,2}:
       
           for k2{1,,2}:
               Set L={αX : αn[(kn1)π,knπ],αnt[(knt1)2π2,knt2π2],1<t<n1}
               Order L by increasing values of α1
               Append L to the end of P and set X=XL
Return P

Since the sample space is [0,2π]n1×[0,π], finding the appropriate points in the nested for loop is very easy. We conclude with an experimental example with n=2, =12, ϵ=.1, and δ=.01. We must sample at least 87 points, and we do so below.

Example: To demonstrate the results of the SpherePathFinder algorithm, we sample 100, 300, and 600 points on the 2-sphere. Only the paths are shown, which wind around 12 times. The range of distances d between consecutive ordered points is also given, with an average ˜d.


As N increases and the winding number stays the same, the path gets more and more jagged. To make the path smoother, we would need to increase the number of times the path winds around the sphere.

References: Bauer and Polthier (Detection of Planar Regions in Volume Data for Topology Optimization), Niyogi, Smale, and Weinberger (Finding the homology of submanifolds with high confidence from random samples), Sloane (OEIS A036069, A004731), Wikipedia (article "N-sphere")

No comments:

Post a Comment