Skip to main content
NIHPA Author Manuscripts logoLink to NIHPA Author Manuscripts
. Author manuscript; available in PMC: 2012 Mar 1.
Published in final edited form as: J Comput Sci. 2011 Mar 1;2(1):88–91. doi: 10.1016/j.jocs.2010.12.003

Analytically exact spiral scheme for generating uniformly distributed points on the unit sphere

Cheng Guan Koay a,*
PMCID: PMC3079956  NIHMSID: NIHMS261396  PMID: 21516173

Abstract

The problem of constructing a set of uniformly-distributed points on the surface of a sphere, also known as the Thomson problem, has a long and interesting history, which dates back to J.J. Thomson in 1904. A particular variant of the Thomson problem that is of great importance to biomedical imaging is that of generating a nearly uniform distribution of points on the sphere via a deterministic scheme. Although the point set generated through the minimization of electrostatic potential is the gold standard, minimizing the electrostatic potential of one thousand points (or charges) or more remains a formidable task. Therefore, a deterministic scheme capable of generating efficiently and accurately a set of uniformly-distributed points on the sphere has an important role to play in many scientific and engineering applications, not the least of which is to serve as an initial solution (with random perturbation) for the electrostatic repulsion scheme. In the work, we will present an analytically exact spiral scheme for generating a highly uniform distribution of points on the unit sphere.

Keywords: uniform distribution on sphere, deterministic scheme, fixed-point formula, analytically exact spiral scheme

1. Introduction

The problem of constructing a set of uniformly-distributed points on the surface of a sphere has a long and interesting history, which dates back to J.J. Thomson in 1904, [13] and also [5]. A particular variant of the Thomson problem that is of great importance to biomedical imaging is that of generating a nearly uniform distribution of points on the sphere via a deterministic scheme. Although the point set generated through the minimization of electrostatic potential based Coulomb’s law is the gold standard, minimizing the electrostatic potential of one thousand points (or charges) or more remains a formidable task. Therefore, a deterministic scheme capable of generating efficiently and accurately a set of uniformly-distributed points on the sphere has an important role to play in many scientific and engineering applications such as 3D projection reconstruction of Computed Tomography (CT) or Magnetic Resonance (MR) images[10, 1], analysis of the distribution of stars [3] and material science [14], not the least of which is to serve as an initial solution (with random perturbation) for the nonlinear minimization of its electrostatic potential energy or the iterative scheme of Centroidal Voronoi Tessellation on the sphere [4]. Many deterministic schemes have been proposed and most notable of which are the spiral, the equal solid angle and the quasi Monte-Carlo-based schemes, e.g. [11, 12, 3, 1].

In this work, we will present an analytically exact spiral scheme for generating a highly uniform set of points on the unit sphere. This analytically exact spiral scheme is intuitive and geometrically motivated and its geometric flavor is similar to those of [12] and [3]. By analytically exact, we mean that our formulation and implementation of the spiral scheme do not depend on asymptotic approximations such as that of Bauer and on arbitrary parameters that need some experimentation or tweaking, which was the case with the spiral scheme of [11, 12].

2. Methods

Between the spiral schemes of [11] and [3], Bauer’s formulation of his spiral scheme is simpler and more direct, and therefore, we will adopt his formulation in presenting our analytically exact spiral scheme. Figure 1 shows a surface element and a line element on the unit sphere in spherical coordinates. The line element, ds, can be expressed as

Figure 1.

Figure 1

A surface element and a line element on the unit sphere.

ds2=sin2(θ)dφ2+dθ2, (1)
ds=1+sin2(θ)(dφdθ)2dθ. (2)

The first step in constructing a spiral scheme is to set the slope of the spiral curve, given dφdθ, to some constant, m. This step leads to the following equation between θ and φ:

φ=mθ. (3)

By substituting Eq. (3) into Eq. (2) and integrating Eq. (2) from 0 to Θ, with 0 ≤ Θ ≤ π, it is clear that the length of a segment of the spiral curve, denoted by S(Θ), can be described precisely by the elliptic integral of the second kind as shown below:

S(Θ)={2E(m2)E(πΘm2):π/2<ΘπE(Θ,m2):0Θπ/2 (4)

Please note that our definition of the elliptic integral of the second kind is given by the following expression, which is consistent with our previous work in [9]:

E(φm)=0φ1msin2(θ)dθ,0φπ/2 (5)
E(m)0π/21msin2(θ)dθ. (6)

Note also that E(m) is known as the complete elliptic integral of the second kind. Thus, the total length of the spiral curve is given by 2E(−m2), i.e., S(π) = 2E(−m2). A well-known and interesting property noted and used by Bauer in his spiral scheme was that S(π) asymptotically approaches 2m, denoted as S(π) ~ 2m, because E(−m2) ~ m for large m.

The second step is to divide the spiral curve into n segments of equal length, which is S(π)/n, and then collect the center point of each segment along the spiral curve as an element of the desired point set. To ensure that the spacing between adjacent turns of the spiral curve is not too close or too wide, we will keep the spacing between adjacent turns of the spiral curve to be equal to the length of a segment. This construction can be viewed from the point of view of keeping the area enclosed by a segment and the spacing between adjacent turns of the spiral curve to be nearly equal for every segment. Due to this simple relationship, φ = , the spacing turns out to be 2π/m because as the spiral makes a complete turn, φ completes a cycle, which is 2π. Therefore, we have the criterion:

2π/m=S(π)/n (7)

or

m=2nπS(π), (8)
=nπE(m2). (9)

It is interesting to note that Eq. (9) is a fixed point formula for m and can be solved directly, see for example another example of fixed point formula in MR analysis of signals, [7]. Specifically, let’s define g(m)=nπE(m2) and iterate the function g on itself such that |gi(m0) − mi−1| < ε for some nonnegative integer i and a small fixed positive number ε, e.g., ε = 1.0 × 10−8. Note that gi denotes composition of the function, g, i number of times, i.e., gi(m0) ≡ g(· · · g(g(m0))). Any iterative scheme requires good starting values. Here, we use the asymptotic form of the solution which is mnπ because E(−m2) is asymptotically equal to m for large m. The iteration based on Eq. (9) is highly inefficient and converges very slowly when m is large. This inefficiency can be gleaned from the first order derivative of Eq. (9) with respective to m. Specifically, although the absolute value of the derivative is less than unity, which implies convergence, it approaches unity in the limit when m approaches infinity. For completeness, we have included in Appendix A a highly efficient iterative approach based on Newton’s method. For example, when n = 500 the fixed point method and Newton’s method took 4884 and 4 iterations, respectively, at the ε level of 1.0 × 10−8 and with the initial solution of mnπ. It is a significant gain in performance with at least three order of magnitude! Further examples are shown in Figure 2.

Figure 2.

Figure 2

The new spiral point set of 88 points and its Voronoi tessellation.

Finally, the last step is to find the midpoint of each segment once we have the value of m. Based on the criterion stated above, we know that the length of each segment is exactly 2π/m. Therefore, the point, Θ, at the end of the first spiral segment should satisfy the following equation:

S(Θ)=2π/m. (10)

Similarly, we can find the midpoint of each segment but we will have to solve for Θj in the following equation:

S(Θj)=(2j1)π/m,j=1,,n. (11)

We define here an ‘inverse function’ of S, denoted by S−1, as a concise notation for expressing the solution above, i.e.,

Θj=S1((2j1)π/m),j=1,,n. (12)

Solving the nonlinear equation above requires reasonable initial solutions. Here, we used Θj=cos1(12j1n) for j = 1, …, n as the initial set of Θj’s. This nonlinear equation can be solved via Newton’s method of root-finding, which was mentioned in Appendix A. Please refer to Appendix B for the specific algorithm for the iterative map of Θ.

It is clear then a desired spiral point set, {(Θj,Φj)}j=1n, based on the proposed scheme can be constructed by following the three steps described above. Please note here that φj = mΘj for all j. For completeness, the spiral points in Cartesian coordinates, {(Xj,Yj,Zj)}j=1n, are given by the following transformations:

Xj=sin(Θj)cos(Φj),Yj=sin(Θj)sin(Φj),Zj=cos(Θj).

As an illustration, we show here the spiral point set of 88 points generated via the proposed scheme and its spherical Voronoi tessellation, see Figure 2. The Voronoi area and circumference of each of the 88 points are shown in Figure 3. Note that the dotted line on Figure 3A indicates the value of 4π/88, which is the surface area of the unit sphere divided by the number of points used in the illustration. It is clear that the Voronoi areas on both the North and the South poles are more variable than along the equator and the Voronoi circumferences is symmetric about the equator and vary cyclically on every turn of the spiral curve.

Figure 3.

Figure 3

(A) Voronoi area and (B) circumference of each of the 88 points shown in Figure 2.

3. Discussion

The proposed scheme is analytically exact and does not require further experimentation. Although the proposed scheme contains two nonlinear equations that need to be solved iteratively, we have provided here two highly optimized and efficient iterative algorithms. For example, it took only 1.6 and 3.2 seconds to generate respectively 5000 and 10000 points in Mathematica 7, [15], running on a laptop with Intel® Core i7 CPU at 1.73 GHz. Most notably, the gain in performance is at least three order of magnitude compared to the fixed point method when n is large, say greater than 500.

Voronoi area and circumference may serve as qualitative measures on uniformity or lack thereof of any point set of the sphere as illustrated in Figure 3. Ideally, it would be nice to know the expected variability of the Voronoi areas and circumferences of the gold standard as obtained from the global minimum of the electrostatic repulsion optimization scheme.

We will end this short note with an unsolved challenge—it is to devise a deterministic scheme to generate a highly uniform distribution of antipodally symmetric points on the sphere, see in particular [6]. Uniform point set on the sphere that satisfies antipodal symmetry is of great importance in diffusion tensor Magnetic Resonance Imaging (MRI),e.g., [2, 6, 8]. Unfortunately, any spiral scheme will definitely fail to satisfy antipodal symmetry because it is topologically incompatible with this type of symmetry. The usual ad hoc strategy to come up with an antipodally symmetric point set is to collect half of the points that are located on one of the hemispheres. The main problem with this strategy is that there is clear and visible discrepancy in the uniformity of the distribution along the equator.

Acknowledgments

The author would like to express his sincere thanks to Dr. Peter J. Basser and Prof. Beth Meyerand for their continued support. Software related to this work is available freely at http://sites.google.com/site/hispeedpackets/. The author would like to acknowledge that the vertices of the spherical Voronoi tessellation were generated from software developed by Dr. John Burkardt, see http://people.sc.fsu.edu/~jburkardt/m_src/sphere_cvt/sphere_cvt.html.

Biography

graphic file with name nihms261396b1.gifCheng Guan Koay is currently an assistant scientist in the Department of Medical Physics, University of Wisconsin-Madison. After completing his undergraduate studies in Mathematics at Berea College in 2002 and graduate studies in Physics at the University of Wisconsin-Madison in 2005, he held a research position as an IRTA fellow at the National Institutes of Health until August, 2010. His current research focuses on diffusion Magnetic Resonance Imaging (diffusion MRI), analysis of MR signals and noise and applications of optimization techniques in biomedical problems.

Appendix A

In this appendix, we will provide a highly efficient algorithm based on Newton’s method for finding the fixed point of m in Eq. (9).

Let g(m)m=nπE(m2) and f (m) = g(m) − m = 0. The goal of the present algorithm is to find the root of f by performing the following iterative algorithm:

km(mj)mj+1=mjf(mj)dfdm(mj). (13)

It can be shown that Eq. (13) can be reduced to the following expression:

km(m)=mπn(2E(m2)K(m2))nπE(m2)nπK(m2)+mE(m2)2 (14)

The function K is the complete elliptic integral of the first kind and is defined in the following convention:

K(m)0π/2(1msin2(θ))1/2dθ. (15)

The gain in performance in terms of the number of iteration, tested at the level of ε = 1.0 × 10−8 and with the initial solution of mnπ, is shown in Figure 4. It is clear that Newton’s method outperforms the fixed point method more and more as the number of points increases.

Figure 4.

Figure 4

Performance evaluation of the fixed point method and Newton’s method.

Appendix B

In this appendix, we will also provide a similar algorithm based on Newton’s method for finding the root of Eq.(11).

Let fj) = Sj) − (2j − 1)π/m. As described in Appendix A, we want to find the iterative map of kΘj, which is similar to the km(mj) of Appendix A. For completeness, we write down the expression for kΘj here:

kΘj(Θj,l)Θj,l+1=Θj,lf(Θj,l)dfdΘj(Θj,l). (16)

Please note that the index j is associated with the j-th midpoint on the spiral curve and the index l refers to the l-th iteration. Finally, Eq. (16) can be further reduce to the following expression:

kΘj(Θj,l)=Θj,l+(2j1)πmS(Θj,l)m(1+m2sin2(Θj,l)). (17)

Footnotes

Publisher's Disclaimer: This is a PDF file of an unedited manuscript that has been accepted for publication. As a service to our customers we are providing this early version of the manuscript. The manuscript will undergo copyediting, typesetting, and review of the resulting proof before it is published in its final citable form. Please note that during the production process errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain.

References

  • 1.Ahmad R, Deng Y, Vikram DS, Clymer B, Srinivasan P, Zweier JL, Kuppusamy P. Quasi Monte Carlo-based isotropic distribution of gradient directions for improved reconstruction quality of 3D EPR imaging. Journal of Magnetic Resonance. 2007;184 (2):236–245. doi: 10.1016/j.jmr.2006.10.008. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 2.Basser PJ, Mattiello J, Le Bihan D. MR diffusion tensor spectroscopy and imaging. Biophys J. 1994;66(1):259–267. doi: 10.1016/S0006-3495(94)80775-1. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Bauer R. Distribution of points on a sphere with application to star catalogs. Journal of guidance control and dynamic. 2000;23:130–137. [Google Scholar]
  • 4.Du Q, Faber V, Gunzburger M. Centroidal voronoi tessellations: applications and algorithms. SIAM Review. 1999;41 (4):637–676. [Google Scholar]
  • 5.Fekete M. Über die Verteilung der Wurzeln bei gewissen algebraischen Gleichungen mit ganzzahligen Koeffizienten. Mathematische Zeitschrift. 1923;17:228–249. [Google Scholar]
  • 6.Jones D, Horsfield MA, Simmons A. Optimal strategies for measuring diffusion in anisotropic systems by magnetic resonance imaging. Magnetic Resonance in Medicine. 1999;42 (3):515–525. [PubMed] [Google Scholar]
  • 7.Koay CG, Basser PJ. Analytically exact correction scheme for signal extraction from noisy magnitude MR signals. Journal of Magnetic Resonance. 2006;179 (2):317–322. doi: 10.1016/j.jmr.2006.01.016. [DOI] [PubMed] [Google Scholar]
  • 8.Koay CG, Chang LC, Carew JD, Pierpaoli C, Basser PJ. A unifying theoretical and algorithmic framework for least squares methods of estimation in diffusion tensor imaging. Journal of Magnetic Resonance. 2006;182 (1):115–125. doi: 10.1016/j.jmr.2006.06.020. [DOI] [PubMed] [Google Scholar]
  • 9.Koay CG, Nevo U, Chang LC, Pierpaoli C, Basser PJ. The elliptical cone of uncertainty and its normalized measures in diffusion tensor imaging. IEEE Transactions on Medical Imaging. 2008;27 (6):834–846. doi: 10.1109/TMI.2008.915663. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 10.Peters DC, Korosec FR, Grist TM, Block WF, Holden JE, Vigen KK, Mistretta CA. Undersampled projection reconstruction applied to mr angiography. Magnetic Resonance in Medicine. 2000;43:91–101. doi: 10.1002/(sici)1522-2594(200001)43:1<91::aid-mrm11>3.0.co;2-4. [DOI] [PubMed] [Google Scholar]
  • 11.Rakhmanov E, Saff E, Zhou Y. Minimal discrete energy on the sphere. Mathematical Research Letters. 1994;1:647–662. [Google Scholar]
  • 12.Saff E, Kuijlaars A. Distributing many points on a sphere. The Mathematical Intelligencer. 1997;19:5–11. [Google Scholar]
  • 13.Thomson JJ. On the structure of the atom: an investigation of the stability and periods of oscillation of a number of corpuscles arranged at equal intervals around the circumference of a circle; with application of the results to the theory of atomic structure. Philosophical Magazine. 1904 March;7 (39):237–265. [Google Scholar]
  • 14.Voogd JM, Sloot PMA, van Dantzig R. Crystallization on a sphere. Future Generation Computer System. 1994;10:359–361. [Google Scholar]
  • 15.Wolfram S. The Mathematica book. Wolfram Media; Champaign: 2003. [Google Scholar]
  • 16.Wong S, Roos M. A strategy for sampling on a sphere applied to 3D selective RF pulse design. Magnetic Resonance in Medicine. 1994;32:778–784. doi: 10.1002/mrm.1910320614. [DOI] [PubMed] [Google Scholar]

RESOURCES