# The spherical cap discrepancy of HEALPix points

Damir Ferizović1 ,  Julian Hofstadler2 and  Michelle Mastrianni3

###### Abstract.

In this paper we show that the spherical cap discrepancy of the point set
given by centers of pixels in the HEALPix tessellation (short for
Hierarchical, Equal Area and iso-Latitude Pixelation) of the unit $2$-sphere
is lower and upper bounded by order square root of the number of points, and
compute explicit constants. This adds to the known collection of explicitly
constructed sets whose discrepancy converges with order $N^{-1/2}$, matching
the asymptotic order for i.i.d. random point sets. We describe the HEALPix
framework in more detail and give explicit formulas for the boundaries and
pixel centers. We then introduce the notion of an $n$-convex curve and prove
an upper bound on how many fundamental domains are intersected by such curves,
and in particular we show that boundaries of spherical caps have this
property. Lastly, we mention briefly that a jittered sampling technique works
in the HEALPix framework as well.

[1] Katholieke Universiteit Leuven, Celestijnenlaan 200B, Leuven, 3001,
Belgium. Email<EMAIL_ADDRESS>Supported by long term structural
funding – Methusalem grant of the Flemish Government; the Austrian Science
Fund (FWF): F5503 “Quasi-Monte Carlo Methods”; and FWF: W1230 “Doctoral School
Discrete Mathematics.”

[2] Universität Passau, Innstraße 33, Passau, 94032, Germany. Email:
<EMAIL_ADDRESS>Supported by Deutsche Forschungsgemeinschaft
(DFG) within project 432680300 - SFB 1456 (subproject B02) and the Johannes
Kepler University Linz.

[3] University of Minnesota, 206 Church St. SE, Minneapolis, 55455, Minnesota,
USA. Email<EMAIL_ADDRESS>Supported by DMS-2054606 through the US National
Science Foundation.

##  1\. Introduction

HEALPix, short for “Hierarchical, Equal Area and iso-Latitude Pixelation,” is
an algorithm introduced in [14] to discretize $\mathbb{S}^{2}$ and has been
widely used in cosmology and astrophysics. Given $\ell\in\mathbb{N}_{0}$, the
algorithm produces a tessellation starting with 12 base pixels followed by a
further binary partition up to resolution $\ell$. In this paper we study the
spherical cap discrepancy of the point set given by the centers of the HEALPix
pixels. We discuss the tessellation algorithm in more detail in §2 and give a
precise definition of $\Gamma$, a projection of the sphere onto the plane, in
§3.1.

######  Definition 1.

Let $N=12\cdot 4^{\ell}$ and let $\Gamma$ be as defined in §3.1. Then the
HEALPix points $H_{N}$ on $\mathbb{S}^{2}$ are defined as the preimage under
$\Gamma$ of the centers of squares obtained by the image of the HEALPix
tessellation under $\Gamma$.

In order to quantify how well-distributed HEALPix points are on
$\mathbb{S}^{2}$, we use the spherical cap discrepancy. We refer for other
notions of discrepancy to the texts [17] and [11] and for their applications
to the surveys [8] and [16]. There are other ways to quantify uniform
distribution. For example, one can consider the _Riesz $s$-energy_ of a point
set: see [9] for a comprehensive monograph on these topics.

Let $\mathbb{S}^{2}=\\{z\in\mathbb{R}^{3}:\|z\|=1\\}$ denote the unit sphere
in the Euclidean space $\mathbb{R}^{3}$, where $\|\cdot\|$ is induced by the
standard inner product $\langle x,y\rangle$. A _spherical cap_ with center
$w\in\mathbb{S}^{2}$ and height $t\in[-1,1]$ is given by the set

$C(w,t)=\\{x\in\mathbb{S}^{2}\ :\ \langle x,w\rangle\geq t\\}.$

######  Definition 2 (Local spherical cap discrepancy).

Let $Z_{N}=\\{z_{1},\ldots,z_{N}\\}\subset\mathbb{S}^{2}$. The local spherical
cap discrepancy of $Z_{N}$ with respect to a cap $C(w,t)$ is

$\mathcal{D}_{C(w,t)}(Z_{N})=\Bigl{\lvert}\frac{1}{N}\sum_{j=1}^{N}\mathds{1}_{C(w,t)}(z_{j})-\sigma(C(w,t))\Bigr{\rvert},$

where $\sigma$ is the normalized uniform measure on $\mathbb{S}^{2}$.

######  Definition 3 (Spherical cap discrepancy).

Let $Z_{N}=\\{z_{1},\ldots,z_{N}\\}\subset\mathbb{S}^{2}$. The spherical cap
discrepancy of $Z_{N}$ is

$\mathcal{D}(Z_{N})=\sup_{w\in\mathbb{S}^{2}}\sup_{-1\leq t\leq
1}\mathcal{D}_{C(w,t)}(Z_{N}).$

Lubotzky, Phillips and Sarnak in [18] were the first to achieve an upper bound
for the spherical cap discrepancy of a deterministic point set, of the order
$N^{-1/3}\log^{2/3}N$. Aistleitner, Brauchart, and Dick showed in [1] that for
i.i.d. random point sets, spherical digital nets, and spherical Fibonacci
lattices, the spherical cap discrepancy is at most of order $N^{-1/2}$. The
latter two point sets are deterministic, and a further such example is given
by the Diamond ensemble introduced first in [6], which has cap discrepancy of
order $N^{-1/2}$ as shown in [12]. Beck showed in [3] that there exist point
sets $\omega_{N}^{\star}$ which achieve even lower order discrepancy: there
are constants $c,C>0$ independent of $N$ such that

$cN^{-3/4}\leq\mathcal{D}(\omega_{N}^{\star})\leq CN^{-3/4}\sqrt{\log N}$ (1)

where the lower bound holds for all $N$-point sets. Numerical results indicate
that Fibonacci lattices achieve discrepancy of an order close to Beck’s upper
bound. On the other hand, probabilistic point sets with discrepancy matching
this upper bound with high probability were obtained in [2] and later in [7].

Our main result is as follows and extends Proposition 2.4 in [15], where
$H_{N}$ are shown to be asymptotically uniformly distributed.

######  Theorem 1.

Let $H_{N}$ be the set of centers of pixels in a HEALPix tessellation of
$\mathbb{S}^{2}$ with $N$ pixels. Then

$\frac{2}{\sqrt{3}}N^{-1/2}\leq\mathcal{D}(H_{N})\leq\frac{2(5+\sqrt{2})}{\sqrt{3}}N^{-1/2}+1000N^{-1}.$

To obtain the coefficient of the leading term in the upper bound, we bound the
maximum number $I_{H_{N}}$ of pixels of the HEALPix tessellation that are
intersected by spherical caps. We believe that the constant could be improved
to $4/\sqrt{3}$, which would make the HEALPix points the deterministic
algorithm with the lowest-known constant in the discrepancy upper bound. This
would follow from the proof technique used later and from the following
conjecture.

######  Conjecture 1.

$I_{H_{N}}=2^{3+\ell}$, where $N=12\cdot 4^{\ell}$.

Much of our paper is devoted to showing that $I_{H_{N}}\leq
4(5+\sqrt{2})2^{\ell}+1000$. We do so by projecting the boundaries of
spherical caps under the HEALPix projection $\Gamma$, bounding their lengths,
and employing a lemma that relates the length of a curve to the number of
intersections with the projected subpixels of the HEALPix tessellation.

In §2 of the paper, we describe the HEALPix tessellation in more detail and
give explicit formulas for the boundaries. (The appendix includes a more
detailed indexing of the pixel centers for the reader’s convenience.) We also
parametrize the boundaries of spherical caps which are used throughout the
text. §3 introduces the projection
$\Gamma:\mathbb{S}^{2}\rightarrow\mathbb{R}^{2}$ of HEALPix pixels into the
plane and some key properties. The main theorem is proved in §4. For the upper
bound of the discrepancy, we use a bound on the length of $\Gamma(\partial C)$
for spherical caps $C$, and then employ a classical approach. The lower bound
of the same order is then established by considering a particular spherical
cap. Lastly, we mention that a jittered sampling technique in the HEALPix
lattice yields Beck’s upper bound (1). In §5 we will introduce the notion of
an $n$-convex curve and prove an upper bound on how many fundamental domains
are intersected by such curves, as recently studied by the first-named author
in [13]. This upper bound depends directly on the length of the curve, so we
then show a length bound for boundaries of spherical caps. The last part of
the section is the final ingredient to show that the boundaries of spherical
caps are $n$-convex.

##  2\. Boundaries of the HEALPix pixels and spherical caps

Equal area partitions of the sphere give rise to point sets with good
distribution properties; examples of such partitions are given in [10] and
[19]. The HEALPix tessellation is another such example. The HEALPix algorithm
introduces a division of the sphere into 12 spherical rectangles (base pixels)
of equal area, each of which allows a dyadic decomposition into smaller
rectangles and satisfies the following three properties.

  1. (1)

_Hierarchical structure of the database._ The resolution of a particular
tessellation increases by dividing each pixel into four smaller ones. The
hierarchical nature of the HEALPix algorithm allows us to easily define the
center and boundaries of each pixel.

  2. (2)

_Equal areas of pixels._ Ensuring equal area of pixels in a HEALPix
tessellation of any resolution is advantageous in a number of physical
contexts.

  3. (3)

_Iso-Latitude distribution of pixels._ As in item 1. above, this property is
useful in allowing us to precisely define the centers and boundaries of the
pixels.

We introduce below the general formulas for the boundaries of pixels,
following [14].

###  2.1. HEALPix tessellation algorithm

The sphere is separated into three regions: the north pole cap, the equatorial
belt and the south pole cap. The lines of separation between the regions are
given via intersection of $\mathbb{S}^{2}$ with
$\mathbb{R}^{2}\times\\{\pm\frac{2}{3}\\}$ (see Figure 4).

We refer to the 12 base pixels, which form the basis of the subdivision
algorithm, as the level 0 HEALPix tessellation $\mathcal{T}_{0}$: shown in
Figure 1 below. Note that four of the base pixels lie entirely within the
equatorial belt; four pixels share a vertex at the north pole; and the
southern hemisphere is a copy of the northern with negated $z$-value.

The level $\ell$ tessellation $\mathcal{T}_{\ell}$ takes a dyadic
decomposition of each base pixel into $4^{\ell}$ subpixels of equal area. In
total there are $12\cdot 4^{\ell}$ many pixels in $\mathcal{T}_{\ell}$. We
refer to $\ell$ as the _resolution parameter_ or _level_ of a tessellation.

Figure 1. HEALPix tessellations at levels 0, 1, 2, and 3. ©AAS. Reproduced
with kind permission from the authors of [14] and The Astrophysical Journal.
See DOI: 10.1086/427976.

###  2.2. Boundaries of pixels in equatorial belt

First consider the base pixels that are entirely contained within the
equatorial belt. Suppose the resolution parameter of the HEALPix tesselation
is $\ell$, i.e. each base pixel is divided into $4^{\ell}$ rectangular shapes
of equal area and similar diameter. Let $L=2^{\ell}$. Then we define for
$j\in\\{0,1,\ldots,4L-1\\}$

$\begin{array}[]{rcl}\Phi^{\ell}_{j}:I_{j}^{\ell}&\rightarrow&\big{[}0,\frac{\pi}{2}\big{]}\\\
\phi&\mapsto&\phi-\frac{j}{L}\frac{\pi}{2}\end{array}\hskip
14.22636pt\mbox{with}\hskip
14.22636ptI_{j}^{\ell}:=\Big{[}\frac{j}{L}\frac{\pi}{2},\frac{j+L}{L}\frac{\pi}{2}\Big{]}.$

The pixel boundaries of resolution parameter $\ell$ are obtained via curves
$m_{j,\ell}^{e}$ from north to south, and curves $p_{j,\ell}^{e}$ from south
to north, implicitly given by the lines

$m_{j,\ell}^{e}\sim\cos(\theta)=\frac{2}{3}-\frac{8}{3\pi}\Phi_{j}^{\ell}(\phi)\hskip
7.11317pt\text{ and }\hskip
7.11317ptp_{j,\ell}^{e}\sim\cos(\theta)=-\frac{2}{3}+\frac{8}{3\pi}\Phi_{j}^{\ell}(\phi),$

meaning that
$m_{j,\ell}^{e}=\big{(}\cos(\phi)\sin(\theta),\sin(\phi)\sin(\theta),\cos(\theta)\big{)}$
for $\phi\in I_{j}^{\ell}$ and $\theta=\theta(\ell,j)$.

###  2.3. Boundaries of pixels in north and south pole caps

We will only describe the boundaries for pixels in the north pole cap, as
those on the south pole cap are obtained by changing the sign of the
$z$-value. The boundaries for the base pixels are given by a fixed
$\phi\in\\{0,\frac{\pi}{2},\pi,\frac{3\pi}{2}\\}$ and all
$0\leq\theta\leq\arccos(\frac{2}{3})$. We index the four base pixels with
vertex at the north pole by $k\in\\{0,1,2,3\\}$. If $\ell\geq 1$ let
$L=2^{\ell}$; we define for $k$ and $j\in\\{1,\ldots,L-1\\}$:

$\begin{array}[]{rcl}\Phi^{\ell,k}_{j}:E_{j}^{\ell,k}&\rightarrow&\big{[}\frac{j}{L}\frac{\pi}{2},\frac{\pi}{2}\big{]}\\\
\phi&\mapsto&(k+1)\frac{\pi}{2}-\phi\end{array}\hskip
14.22636pt\mbox{with}\hskip
14.22636ptE_{j}^{\ell,k}:=\Big{[}k\frac{\pi}{2},(k+1)\frac{\pi}{2}-\frac{j}{L}\frac{\pi}{2}\Big{]};$

and further

$\begin{array}[]{rcl}\psi^{\ell,k}_{j}:A_{j}^{\ell,k}&\rightarrow&\big{[}\frac{j}{L}\frac{\pi}{2},\frac{\pi}{2}\big{)}\\\
\phi&\mapsto&\phi-k\frac{\pi}{2}\end{array}\hskip 14.22636pt\mbox{with}\hskip
14.22636ptA_{j}^{\ell,k}:=\Big{[}k\frac{\pi}{2}+\frac{j}{L}\frac{\pi}{2},(k+1)\frac{\pi}{2}\Big{)}.$

The pixel boundaries of resolution parameter $\ell$ are obtained via curves
$m^{n}_{j,k,\ell}$ from north to south, and curves $p^{n}_{j,k,\ell}$ from
south to north, implicitly given by the lines (where
$\theta=\theta(j,k,\ell)$):

$\displaystyle
m^{n}_{j,k,\ell}\sim\cos(\theta)=1-\frac{j^{2}}{3L^{2}}\Big{(}\frac{\pi}{2\Phi_{j}^{k,\ell}(\phi)}\Big{)}^{2}\hskip
5.69046pt\text{ and }$ $\displaystyle
p^{n}_{j,k,\ell}\sim\cos(\theta)=1-\frac{j^{2}}{3L^{2}}\Big{(}\frac{\pi}{2\psi_{j}^{\ell,k}(\phi)}\Big{)}^{2}.$

###  2.4. Parametrizations of spherical cap boundaries

In all that follows,
$\gamma:[0,2\pi)\times(0,\pi)\rightarrow\mathbb{S}^{2}_{p}$ is the standard
parametrization of the (punctured) sphere defined below:

$\begin{array}[]{rcl}(\phi,\theta)&\mapsto&\gamma(\phi,\theta)=\left(\begin{array}[]{l}\cos(\phi)\sin(\theta)\\\
\sin(\phi)\sin(\theta)\\\ \cos(\theta)\end{array}\right).\end{array}$ (2)

(We exclude the poles to obtain an injection, but in what follows we sometimes
abuse notation and plug in points of the form $(\phi,0)$ and $(\phi,\pi)$.)
Let $C=C(w,t)$ be a spherical cap with boundary $\partial C$, and
$\gamma(\phi_{w},\theta_{w})=w\in\mathbb{S}^{2}$ and $t\in[0,1)$, then we have
by the trigonometric angle sum formulas

$\partial C=\Big{\\{}\gamma(\phi,\theta)\ :\
\sin(\theta)\sin(\theta_{w})\cos(\phi-\phi_{w})+\cos(\theta)\cos(\theta_{w})=t\Big{\\}}.$
(3)

Let $c_{w}:=\cos(\theta_{w})$ and $s_{w}:=\sin(\theta_{w})$. If $s_{w}=0$,
then $w$ is one of the poles $p_{n}$ or $p_{s}$ and

$\partial
C(p_{n,s})=\Big{\\{}\gamma(\phi,\arccos\big{(}\tfrac{t}{c_{w}}\big{)})\ :\
\phi\in[0,2\pi)\Big{\\}}.$

In all other cases we can write

$\displaystyle\phi$
$\displaystyle=\phi_{w}+\arccos\Big{(}\frac{t-\cos(\theta)c_{w}}{\sin(\theta)s_{w}}\Big{)}\mbox{
and/or }$ (4) $\displaystyle\phi$
$\displaystyle=\phi_{w}-\arccos\Big{(}\frac{t-\cos(\theta)c_{w}}{\sin(\theta)s_{w}}\Big{)},$
(5)

since the cosine from (3) depends on $\lvert\phi-\phi_{w}\rvert$, and where

$\theta\in\big{[}\lvert\arccos(t)-\theta_{w}\rvert,\arccos(t)+\theta_{w}\big{]}$

with $t\in[0,1)$ and $\theta_{w}\in[0,\frac{\pi}{2}]$.

As the curvature and other properties for both parametrizations behave
similarly, we will be using only parametrization (4) in the curvature
calculations in §5.3 and elsewhere.

If the north pole is in $\partial C$ but the south pole is not, then
$c_{w}=t$, and since $1-\cos(x)=\tan\big{(}\frac{x}{2}\big{)}\sin(x)$, we
obtain from (4)

$\phi=\arccos\Big{(}\frac{t}{\sqrt{1-t^{2}}}\tan\big{(}\tfrac{\theta}{2}\big{)}\Big{)}+\phi_{w}.$
(6)

If the south pole is in $\partial C$ but the north pole is not, then
$c_{w}=-t$, and since $1+\cos(x)=\cot\big{(}\frac{x}{2}\big{)}\sin(x)$ we
obtain

$\phi=\arccos\Big{(}\frac{t}{\sqrt{1-t^{2}}}\cot\big{(}\tfrac{\theta}{2}\big{)}\Big{)}+\phi_{w}.$
(7)

If the north and south poles are in $\partial C$, then clearly
$\theta_{w}=\frac{\pi}{2}$ and (3) is equivalent to

$\sin(\theta)\cos(\phi-\phi_{w})=t=0,$

and the only possibility for a circle satisfying this relation and going
through the poles is to have

$\partial
C=\gamma\Big{(}\\{\phi_{w}+\frac{\pi}{2},\phi_{w}+\frac{3\pi}{2}\\}\times[0,\pi]\Big{)}.$

##  3\. Projection into the Plane

In this section we define the projection map $\Gamma$ of the HEALPix
tessellation into the plane, as defined in [14], show that it preserves area
up to scaling, and study boundaries of spherical caps under $\Gamma$.

Each of the eight base pixels which have one vertex at a pole are simply
rotated copies of the others. The remaining four base pixels have centers on
the equatorial belt, and again each of these four base pixels are rotated
copies of the others. Thus we have some rotational symmetry.

###  3.1. Definition of $\Gamma$

The projection map

$\begin{array}[]{rcl}\Gamma:\mathbb{S}^{2}_{p}&\rightarrow&R\\\
x&\mapsto&\Gamma(x)\end{array}$

from the sphere to $R:=[0,2)\times(-\frac{1}{2},\frac{1}{2})$ is defined in
the following fashion, where $\gamma$ is as in (2).

  * •

If $\lvert\cos(\theta)\rvert\leq\frac{2}{3}$, then

$\begin{array}[]{rcl}x=\gamma(\phi,\theta)&\mapsto&\Gamma(x)=\left(\begin{array}[]{l}\phi/\pi\\\
3/8\cos(\theta)\end{array}\right).\end{array}$

  * •

If $\cos(\theta)>\frac{2}{3}$, then

$\begin{array}[]{rcl}x=\gamma(\phi,\theta)&\mapsto&\Gamma(x)=\dfrac{1}{\pi}\left(\begin{array}[]{l}\phi-\big{(}1-\sqrt{1-\cos(\theta)}\sqrt{3}\big{)}\cdot(\phi\mod\frac{\pi}{2}-\frac{\pi}{4})\\\
\frac{\pi}{4}\big{(}2-\sqrt{1-\cos(\theta)}\sqrt{3}\big{)}\end{array}\right).\end{array}$

  * •

If $\cos(\theta)<-\frac{2}{3}$, then

$\begin{array}[]{rcl}x=\gamma(\phi,\theta)&\mapsto&\Gamma(x)=\dfrac{1}{\pi}\left(\begin{array}[]{l}\phi-\big{(}1-\sqrt{1-\lvert\cos(\theta)\rvert}\sqrt{3}\big{)}\cdot(\phi\mod\frac{\pi}{2}-\frac{\pi}{4})\\\
\frac{\pi}{4}\big{(}\sqrt{1-\lvert\cos(\theta)\rvert}\sqrt{3}-2\big{)}\end{array}\right).\end{array}$

Figure 2. Projection of HEALPix lattice. ©AAS. Reproduced with kind permission
from the authors of [14] and The Astrophysical Journal. See DOI:
10.1086/427976.

######  Remark 1 (See [14]).

Pixel boundaries are mapped under $\Gamma$ to straight line segments.

Each pixel is mapped to a square in $R$, as the segments
$\Gamma(m^{e}_{j,\ell})$ are parallel to each other and seperated by the same
distance. The same is true for $\Gamma(p^{e}_{j,\ell})$, which are orthogonal
to $\Gamma(m^{e}_{j,\ell})$. The same applies to $\Gamma(m^{n}_{j,k,\ell})$
and $\Gamma(p^{n}_{j,k,\ell})$. The resulting lattice (see Fig. 2) of pixel
centers is the $\mathbb{Z}^{2}$ lattice scaled and rotated.

We use the following fact, which follows from the definition of $\Gamma$,
implicitly in further calculations.

######  Remark 2.

Boundaries of hemispheres going through the poles are mapped to simple
polygons by $\Gamma$. For most other caps $C$, if $\Gamma(\partial C)$
intersects such polygons, it does so at most twice, hence restricting the
geometry of $\Gamma(\partial C)$.

###  3.2. Preservation of area up to scaling

It is shown in [14] that pixels of the same resolution $\ell$ have the same
area. Let $B_{1},\cdots,B_{12}$ denote the 12 base pixels on the sphere. Then
$\Gamma(B_{1}),\Gamma(B_{2}),\cdots,\Gamma(B_{12})$ are squares in $R$ (if we
think of $R$ as a cylinder), and they are all of equal area. The tiling in a
base pixel with resolution parameter $\ell$ is mapped to a tiling in the
associated square of the same resolution, and each of the subpixels at
resolution $\ell$ has equal area. Any open subset $A$ of a base pixel $B_{i}$
can now be approximated from inside and outside via a cover of subpixels of
ever increasing resolution; thus we obtain the following lemma.

######  Lemma 1.

Given a base pixel $B$ and an open set $A\subset B$, then

$\frac{\mathrm{area}(A)}{\mathrm{area}(B)}=\frac{\mathrm{area}(\Gamma(A))}{\mathrm{area}(\Gamma(B))}.$

##  4\. Discrepancy bounds

In this section we prove the main theorem, using ideas about intersections of
curves with lattice boxes that go back to Gauss (e.g. the Gauss circle
problem). We leave the proofs of some necessarily lemmas to §5.

###  4.1. Proof of upper bound of Theorem 1

The next proposition, whose proof is in §5, bounds the length of projected
spherical cap boundaries under $\Gamma$.

######  Proposition 1.

Let $w\in\mathbb{S}^{2},t\in(-1,1)$ be chosen and let
$\Gamma:\mathbb{S}^{2}\rightarrow R$ be as in §3. Set $\beta=\Gamma(\partial
C(w,t))$, then

$\mbox{length}(\beta)\leq 5+\sqrt{2}<6.42.$

The length bound translates directly to the error coefficient in the
discrepancy, as we see below. Let $H_{N}$ be the HEALPix points, i.e., the
centers for some tessellation with a total amount of $N$ pixels.

######  Lemma 2.

For any spherical cap $C=C(w,t)$ the boundary of $C$ intersects at most
$\frac{2(5+\sqrt{2})}{\sqrt{3}}\sqrt{N}+1000$ (sub)-pixels.

The proof of Lemma 2 is also left to §5. We now show the upper bound of
Theorem 1:

$D(H_{N})\leq\frac{2(5+\sqrt{2})}{\sqrt{3}}\frac{1}{\sqrt{N}}+\frac{1000}{N}.$

###### Proof.

Let $C$ be an arbitrary spherical cap. We fix some ordering of the HEALPix
points, $H_{N}=\\{p_{1},\dots,p_{N}\\}$. To each (mid) point $p_{i}$ there
corresponds a pixel which we denote by $P_{i}$. For neighbouring pixels we
assign the boundary between them to exactly one pixel. In this way we have
that pixels are disjoint, while still satisfying $\sigma(P_{i})=\sigma(P_{j})$
for any $1\leq i,j\leq N$.

By disjointness $\sigma(C)=\sum_{i=1}^{N}\sigma(C\cap P_{i})$ and consequently

$\displaystyle\left|\frac{1}{N}\sum_{i=1}^{N}\mathds{1}_{C}(p_{i})-\sigma(C)\right|$
$\displaystyle=\left|\sum_{i=1}^{N}\left(\frac{1}{N}\mathds{1}_{C}(p_{i})-\sigma(C\cap
P_{i})\right)\right|$
$\displaystyle\leq\sum_{i=1}^{N}\left|\frac{1}{N}\mathds{1}_{C}(p_{i})-\sigma(C\cap
P_{i})\right|.$

If either $C\cap P_{i}=P_{i}$, or $C\cap P_{i}=\varnothing$, then
$|\frac{1}{N}\mathds{1}_{C}(p_{i})-\sigma(C\cap P_{i})|=0$, since HEALPix
provides an equal area partition. Otherwise, i.e., when $\partial C$
intersects $P_{i}$, one has $|\frac{1}{N}\mathds{1}_{C}(p_{i})-\sigma(C\cap
P_{i})|\leq\frac{1}{N}$. So by Lemma 2 we can bound the local discrepancy as
follows

$\displaystyle\sum_{i=1}^{N}\left|\frac{1}{N}\mathds{1}_{C}(p_{i})-\sigma(C\cap
P_{i})\right|\leq\frac{2(5+\sqrt{2})}{\sqrt{3}}\frac{1}{\sqrt{N}}+\frac{1000}{N}.$

Since this estimate holds for arbitrary spherical caps the result follows. ∎

###  4.2. Proof of lower bound of Theorem 1

The lower bound for $\mathcal{D}(H_{N})$ is easily achieved by considering the
specific spherical cap $C$ that is centered at the north pole $p_{n}$ and has
height $t=-\frac{1}{N}$: that is, it covers slightly more than half of the
surface area of the sphere. $\lvert H_{N}\rvert=N=12\cdot 4^{\ell}$, so in
each of the 4 base pixels on the equatorial belt, there are $4^{\ell}$
subpixels. Hence there are $2^{\ell}$ subpixels on the “diagonal” of each base
pixel, and their centers are on the equator. Multiplying by 4, we obtain that
the equator contains $\sqrt{\frac{4N}{3}}$ points in $H_{N}$. Thus, the local
cap discrepancy satisfies

$\mathcal{D}_{C\big{(}p_{n},-\tfrac{1}{N}\big{)}}(H_{N})=\frac{2}{\sqrt{3}}N^{-1/2}+O(N^{-1}).$

###  4.3. Remark on jittered sampling in HEALPix pixels

We remark that if the point set $H_{N}$ of centers of HEALPix pixels is
replaced by a point set $J_{N}$ obtained by choosing a point at random from
each pixel, as in jittered sampling methods, we obtain the following upper
bound matching Beck’s:

$\mathcal{D}(J_{N})\leq CN^{-3/4}\sqrt{\log N}.$

This can be seen roughly as follows. Replace the class $\mathcal{C}$ of all
spherical caps $C(w,t)$ with those who have rational $w$ and $t$: call this
class $\mathcal{C}_{\mathbb{Q}}$. The discrepancy with respect to
$\mathcal{C}_{\mathbb{Q}}$ is the same as the discrepancy with respect to
$\mathcal{C}$, but has finite VC dimension (see [1, Proposition 8]).

We can now apply the jittered sampling upper bound for discs given in [17,
Theorem 3.1] — which was originally shown by Beck in [5] — to the class
$\mathcal{C}_{\mathbb{Q}}$ instead. All steps of the proof translate. As we
have argued in Lemma 2, for a spherical cap
$C(w,t)\in\mathcal{C}_{\mathbb{Q}}$, the curve $\Gamma(\partial C(w,t))$
intersects at most $O(\sqrt{N})$ pixels; this gives the analogue of [17, Lemma
3.2]. The analogue of [17, Lemma 3.3] is obtained from the applying the Sauer-
Shelah lemma (see [20], [21]) to $\mathcal{C}_{\mathbb{Q}}$. As this class has
finite VC-dimension, we only need to consider polynomially many elements (in
$N$) of $\mathcal{C}_{\mathbb{Q}}$. Thus we obtain discrepancy on the order of
$N^{-3/4}\sqrt{\log N}$ with respect to the class $\mathcal{C}_{\mathbb{Q}}$,
and hence also with respect to $\mathcal{C}$.

##  5\. Extended calculations

In §5.1 we will introduce the notion of an $n$-convex curve and prove an upper
bound on how many fundamental domains are intersected by such curves, and
prove Lemma 2 up to the constant, which is given by Proposition 1. We also
show in Corollary 1 that it is enough to regard zeros of curvature to show
that the boundaries of spherical caps are $n$-convex. In §5.2 we prove
Proposition 1 by case distinction. This will then give the boundary
contribution in the proof of Theorem 1. Finally, in §5.3 we show that the
boundaries of spherical caps are $n$-convex by studying their curvature.

###  5.1. Intersection of convex curves with fundamental domains

Most of the contents of this section also appear verbatim in a work of the
first-named author [13]. Its original purpose was to prove Lemma 2, but in a
different work he extended and streamlined the result. It is reproduced here
for reviewing purposes.

######  Definition 4.

A continuous curve $\beta:[a,b]\rightarrow\mathbb{R}^{2}$ ($a,b\in\mathbb{R}$,
$a<b$) is $n$-convex for $n\in\mathbb{N}$, if there are points
$a=t_{0}<t_{1}<\ldots<t_{n-1}<t_{n}=b$ with the property that
$\beta\big{(}[t_{j},t_{j+1}]\big{)}$ is a convex curve for each $0\leq j<n$,
i.e. there exist convex sets $A_{1},\ldots,A_{n}$ with
$\beta\big{(}[t_{j},t_{j+1}]\big{)}\subset\partial A_{j}$.

A circle is $1$-convex, as is a straight line segment. We will give a
characterization of $n$-convex regular $\mathcal{C}^{2}$-curves in Lemma 3 in
terms of sub-spirals, which are defined next.

######  Definition 5.

A sub-spiral $S$ is a $\mathcal{C}^{2}$-curve with compact domain, no self-
intersections, and such that the curvature exists, is bounded, and does not
change sign.

A spiral is a sub-spiral, but a circle is not, as it intersects itself at one
point. Recall that a curve $\beta$ is called regular if $\|\dot{\beta}(t)\|>0$
everywhere on its domain, where the derivative at boundary points is defined
via one-sided limits.

######  Lemma 3.

A regular $\mathcal{C}^{2}$-curve $\beta$ is $n$-convex if and only if it
consists of finitely many sub-spirals.

###### Proof.

If $\beta$ is $n$-convex, take arbitrary $c_{0},\ldots,c_{n}$ with
$t_{j}<c_{j}<t_{j+1}$ (the $t_{j}$ as in Definition 4), then clearly each
$\beta\big{(}[t_{j},c_{j}]\big{)}$ and $\beta\big{(}[c_{j},t_{j+1}]\big{)}$ is
a sub-spiral.

To show the other implication, let us first assume
$\beta:[a,b]\rightarrow\mathbb{R}^{2}$ is a sub-spiral itself and we define
for each $\tau\in[a,b]$

$\dot{\beta}^{-}(\tau)=\lim_{\epsilon\rightarrow
0^{+}}\frac{\beta(\tau)-\beta(\tau+\epsilon)}{\epsilon}.$

By regularity we have $\|\dot{\beta}^{-}(\tau)\|>0$, and we define the half-
line

$L(\tau)=\big{\\{}T(\rho,\beta(\tau))\ \mid\ \rho\geq 0\big{\\}}\hskip
8.5359pt\mbox{where}\hskip
8.5359ptT(\rho,\beta(\tau))=\beta(\tau)+\rho\dot{\beta}^{-}(\tau).$

We will now introduce an algorithm to find all necessary $t_{j}$’s:

Loop 1. If $L(a)$ doesn’t intersect $\beta$, proceed to Loop 2. Otherwise let

$\rho_{1}=\min_{\rho}\\{T(\rho,\beta(a))\cap\beta\big{(}[a,b]\big{)}\neq\emptyset\\}.$

If $T(\rho_{1},\beta(a))=\beta(b)$, proceed to Loop 2. Otherwise define
$t_{1}$ so that $\beta(t_{1})=T(\rho_{1},\beta(a))$. If $L(t_{1})$ doesn’t
intersect $\beta$, proceed to Loop 2. Else set

$\rho_{2}=\min_{\rho}\\{T(\rho,\beta(t_{1}))\cap\beta\big{(}[a,b]\big{)}\neq\emptyset\\},$

and $t_{2}$ so that $\beta(t_{2})=T(\rho_{2},\beta(t_{1}))$. By construction,
$\beta([t_{1},t_{2}])$ does not intersect the line segment
$T\big{(}[0,\rho_{1}],\beta(a)\big{)}$, and thus it coils around $\beta(a)$.
If $\beta(t_{2})=\beta(b)$, proceed to Loop 2. Otherwise regard $L(t_{2})$ and
define $\rho_{3},t_{3}$ similarly or proceed to Loop 2. It then follows from
constant sign of curvature, no self-intersection and choices of $\rho_{s}$
that $\beta([t_{2},t_{3}])$ coils around $\beta(a)$ and $\beta(t_{1})$.
Continuing in this fashion we see that this process has to terminate since
$\beta$ has finite length, and we proceed to Loop 2.

Loop 2. Let $\\{t_{1},\ldots,t_{k}\\}$ be the values generated in Loop 1
(potentially empty). We now reverse the parametrization:
$\beta^{\leftarrow}:[a,b]\rightarrow\mathbb{R}^{2}$ with
$\beta^{\leftarrow}(\tau)=\beta(a+b-\tau)$, and proceed as in Loop 1 for the
curve $\beta^{\leftarrow}$, where we replace the command ”proceed to Loop 2”
by “terminate algorithm”.

This way potentially further points are generated, say
$\\{t_{k+1},\ldots,t_{k+m}\\}$, where $t_{k+m}=b$, and we see that $\beta$ is
$(k+m)$-convex. If $\beta$ is the concatenation of sub-spirals $S_{k}$, then
we apply the algorithm above to each $S_{k}$, where we collect all the values
$t_{j}$ in one list and extend it by the points of separation between $S_{k}$
and $S_{k+1}$ if necessary. ∎

To see if a $\mathcal{C}^{2}$-curve is $n$-convex it is hence enough to find
the points of self-intersection and zeros of curvature where the sign changes
– the arcs between these points then are sub-spirals, and the algorithm above
will find $n$.

######  Corollary 1.

The images $\Gamma\big{(}\partial C(w,t)\big{)}$ for all
$(w,t)\in\mathbb{S}^{2}\times(-1,1)$ consist of finitely many pieces which are
at most $36$-convex (and the number of pieces is bounded for all $C(w,t)$).

###### Proof.

This follows from Lemma 3, the definition of $\Gamma$, and the curvature
calculations in §5.3. (Subspirals of $\Gamma(\partial C)$ are 1-convex curves
themselves). Note that spherical caps with centers at the poles and spherical
caps with centers on the equatorial belt and $t=0$ are mapped to polygons
under $\Gamma$, and in this case there are finitely many distinct curves which
are $3$-convex. ∎

######  Definition 6.

Let $Q\mathbb{Z}^{2}$ be a lattice, where $Q$ is an invertible matrix;
$\beta:[a,b]\rightarrow\mathbb{R}^{2}$ a continuous curve; and
$K\in\mathbb{N}$. We further define $\Omega^{Q}_{v}=Q[0,1)^{2}+v$ for some
arbitrary but fixed $v\in\mathbb{R}^{2}$. The intersection number of $\beta$
with the tiling induced by
$\frac{1}{K}\big{(}Q\mathbb{Z}^{2}+\Omega^{Q}_{v}\big{)}$ is

$I_{\beta}^{Q}(K)=\\#\big{\\{}p\in
Q\mathbb{Z}^{2}\mid\big{(}\tfrac{1}{K}\Omega^{Q}_{v}+\tfrac{1}{K}p\big{)}\cap\beta\big{(}[a,b]\big{)}\neq\emptyset\big{\\}}.$

Clearly $I_{\beta}^{Q}(K)$ depends on the choice of $v$, but we will give a
bound of it which does not. In the next lemma we assume $\beta$ to have
finitely many self-intersections to avoid parametrizations that “walk” the
same path a multitude of times.

######  Lemma 4.

Let $\beta$ be a piece-wise $\mathcal{C}^{1}$-curve in $\mathbb{R}^{2}$,
$n$-convex with $m$-many self-intersections for $n,m\in\mathbb{N}_{0}$. Let
$\Lambda^{Q}$ be a full rank lattice, then

$I_{\beta}^{Q}(K)\leq\sqrt{2}\cdot
K\cdot\mathrm{length}\big{(}Q^{-1}\beta\big{)}+19n-m+1.$

###### Proof.

We can assume $v=0$ in the previous definition, by taking $\gamma=\beta-v$ if
necessary. Thus without loss of generality, let
$\beta:[0,1]\rightarrow\mathbb{R}^{2}$ be a parametrization with finitely many
self-intersections and $v=0$. We can cut $\beta$ into sub-curves if necessary,
so we further assume $\beta$ to be $\mathcal{C}^{1}$. The $x,y$-coordinates of
$\beta$ are denoted by $x(t)=\langle\beta(t),e_{1}\rangle$ and
$y(t)=\langle\beta(t),e_{2}\rangle$.

We will first show monotonicity of the coordinates for $\beta$ in certain
intervals. Let $t_{1},\ldots,t_{n}$ be as in Definition 4, and
$M_{j},m_{j}\in\beta\big{(}[0,t_{1}]\big{)}$ satisfy

$\langle
M_{j},e_{j}\rangle=\max_{t\in[0,t_{1}]}\langle\beta(t),e_{j}\rangle\hskip
5.69046pt\mbox{ and }\hskip 5.69046pt\langle
m_{j},e_{j}\rangle=\min_{t\in[0,t_{1}]}\langle\beta(t),e_{j}\rangle.$

Choose $o_{j}^{M}\in\beta^{-1}(M_{j})\cap[0,t_{1}]$ and
$o_{j}^{m}\in\beta^{-1}(m_{j})\cap[0,t_{1}]$ for $j\in\\{1,2\\}$. Let
$o_{1},o_{2},o_{3},o_{4}$ denote these $o_{j}^{m},o_{j}^{M}$ in ascending
order. In the calculations below the pair $(\tau_{1},\tau_{2})$ is
$(o_{k},o_{k+1})$ for some $k\in\\{0,1,2,3,4\\}$ with $\tau_{2}-\tau_{1}>0$,
where $o_{0}=0$ and $o_{5}=t_{1}$.

It follows that the $x,y$-coordinates of $\beta(t)$ are monotone for
$t\in[\tau_{1},\tau_{2}]$ by the convexity assumption: for any
$\kappa\in[0,t_{1}]$ and $\tau\in\\{s\in[0,t_{1}]\ |\
\beta(s)\neq\beta(\kappa)\\}$ we either have that the arc segment of $\beta$
with domain between $\tau$ and $\kappa$ is a straight line, or

$\big{\\{}(1-s)\beta(\kappa)+s\beta(\tau)\ |\
0<s<1\big{\\}}\cap\beta\big{(}[0,t_{1}]\big{)}=\emptyset.$

To prove monotonicity, we work out the example $\beta(\tau_{1})=m_{2}$. The
existence of numbers $\tau_{1}<\epsilon_{1}<\epsilon_{2}<\tau_{2}$ such that
$y(\epsilon_{1})>y(\epsilon_{2})$ will lead to a contradiction in this case
(by the assumption on $\beta(\tau_{1})$, $y(t)$ is monotonously increasing):
either $x(\epsilon_{1})\leq x(\epsilon_{2})$ or
$x(\epsilon_{2})<x(\epsilon_{1})$, in both cases the polygon with vertices and
edges of the form

$\beta(o^{M}_{2})\longrightarrow\beta(\tau_{1})\longrightarrow\beta(\epsilon_{1})\longrightarrow\beta(\epsilon_{2})$

contradicts convexity (we have $y(o^{M}_{2})\geq
y(\epsilon_{1})>y(\epsilon_{2})\geq y(\tau_{1})=y(o^{m}_{2})$). Thus $y(t)$ is
monotonously increasing, and we use this fact to show that $x$ is monotone.
Assume there are numbers
$\tau_{1}<\epsilon_{1}<\epsilon_{2}<\epsilon_{3}<\tau_{2}$ so that
$x(\epsilon_{2})<x(\epsilon_{1})$ and $x(\epsilon_{2})<x(\epsilon_{3})$, then
the following polygon with vertices and edges of the form (depending on the
orientation, we take the symbol ”$*$” to be either $m$ or $M$):

$\displaystyle\beta(o^{*}_{1})$
$\displaystyle\longrightarrow\beta(\epsilon_{1})\longrightarrow\beta(\epsilon_{2})\longrightarrow\beta(\epsilon_{3}),$

contradicts convexity. The case: $x(\epsilon_{1})<x(\epsilon_{2})$ and
$x(\epsilon_{3})<x(\epsilon_{2})$ is similar.

The other choices for $\beta(\tau_{j})$ are analogous ($\tau_{j}=o_{k}$ for
some $k\in\\{1,2,3,4\\}$), only the order in which one shows monotonicity of
$x(t),y(t)$ depends on which coordinate is extremized by $\beta(\tau_{j})$.

We define two supporting axes for each non-trivial arc
$\beta([\tau_{1},\tau_{2}])$ as follows:

$\big{\\{}(1-t)\beta(\tau_{j})+tZ\ |\ 0\leq t\leq 1\big{\\}}\hskip
8.5359pt\mbox{where}\hskip
8.5359ptZ=\binom{\langle\beta(\tau_{1}),e_{1}\rangle}{\langle\beta(\tau_{2}),e_{2}\rangle}\in\mathbb{R}^{2}.$

These line segments above are parallel to the axes, and we denote them
accordingly by $L_{x}$ and $L_{y}$. Let $\gamma=\beta([\tau_{1},\tau_{2}])$
and $Q$ be the identity matrix, then

$I_{\gamma}^{\mathds{1}}(K)\leq
I_{L_{x}}^{\mathds{1}}(K)+I_{L_{y}}^{\mathds{1}}(K)$

by following argument: the coordinates of $\beta(t)$ are monotonous for
$t\in[\tau_{1},\tau_{2}]$ (say both are increasing), then $\beta$ exits a
fundamental domain $\frac{1}{K}\Omega^{\mathds{1}}_{0}+\frac{1}{K}w$, where
$w\in\Lambda^{\mathds{1}}$, only by leaving it trough the top or right side.

  1. (1)

If $\beta$ leaves through the right side, $I_{\gamma}^{\mathds{1}}(K)$ and
$I_{L_{x}}^{\mathds{1}}(K)$ increase by one,

  2. (2)

or else $I_{\gamma}^{\mathds{1}}(K)$ and $I_{L_{y}}^{\mathds{1}}(K)$ increase
by one.

Thus, with $\mathrm{length}(L_{x})=c$ and $\mathrm{length}(L_{y})=d$, we have

$I_{\gamma}^{\mathds{1}}(K)\ \leq\
I_{L_{x}}^{\mathds{1}}(K)+I_{L_{y}}^{\mathds{1}}(K)\ \leq\ (c+d)K+4.$

We further use the inequality $c+d\leq\sqrt{2}\sqrt{c^{2}+d^{2}}$ valid for
all $c,d\in\mathbb{R}$, to derive

$I_{\gamma}^{\mathds{1}}(K)\ \leq\ \sqrt{2}\sqrt{c^{2}+d^{2}}\cdot K+4\ \leq\
\sqrt{2}\ \mathrm{length}(\gamma)\cdot K+4,$

where we used that the shortest path between $\beta(\tau_{1})$ and
$\beta(\tau_{2})$ has length $\sqrt{c^{2}+d^{2}}$. The same reasoning applies
to all sub-intervals (which are at most five), and after summing up and taking
into account that every self-intersection counts a certain domain twice, we
obtain

$I_{\beta}^{\mathds{1}}(K)\leq\sqrt{2}\ \mathrm{length}(\beta)\cdot
K+19n+1-m.$

We will reduce the general case to the one above, by regarding the curve
$\gamma=Q^{-1}\beta$. It is clear that
$I_{\gamma}^{\mathds{1}}(K)=I_{\beta}^{Q}(K)$. Regularity of a curve is not
affected by invertible matrices, neither is the notion of $n$-convexity nor
the values $t_{1},\ldots,t_{n}$. ∎

Note that the constant $\sqrt{2}$ in Lemma 4 cannot be improved, as the
example of the translated diagonal of $I^{2}$ with $Q=\mathds{1}$ already
shows.

###### Proof of Lemma 2.

Note that after applying the projection $\Gamma$ any sub-pixel is a square in
$\mathbb{R}^{2}$ with diagonals parallel to the axes. In order to apply Lemma
4 we rescale the rectangle $R$ by $1/\sqrt{2}$ in each coordinate, so that any
base pixel has side-length $\frac{1}{4}$. Furthermore, we rotate the scaled
rectangle to obtain that any pixel is axis-parallel.

Each base pixel contains exactly $N/12$ sub pixels and by construction we have
$N/12=2^{\ell}$ for some $\ell\in\mathbb{N}$. Boundaries of sub pixels are
equally spaced lines inside each base pixel. This implies that (after the
rotation and rescaling) corners of sub pixels are contained in the lattice
$2^{-\ell-2}\mathbb{Z}^{2}$.

After the rescaling, the length of $\Gamma(\partial C)$ changes by a factor of
$1/\sqrt{2}$. By Corollary 1 and Lemma 4 with $K=2^{\ell+2}$, we obtain the
result. ∎

###  5.2. Proof of Proposition 1

We begin with the following lemma, which is crucial to proving Proposition 1.
The reader should refer to Figure 3 for the setting of the lemma.

######  Lemma 5.

Suppose $\beta$ is a rectifiable curve with endpoints at opposite corners of a
trapezoid; the intersection of each ray $r_{j}$ from $f$ with $\beta$ is a
connected set; $a=\text{\text{length}}(A)$ and
$c=\text{length}(C)>d=\text{length}(D)$; and
$\lvert\text{slope}(A)\rvert\leq\lvert\text{slope}(B)\rvert$, where
$r_{j},f,\beta,A,B,C,D$ are as in Figure 3. Assume further that $\beta$ is
monotone in the $y$-coordinate. Then

$\mbox{length}(\beta)\leq c+a.$

###### Proof.

If $\beta$ is a straight line, we use the well known formula

$\mbox{length}(\beta)=\sqrt{c^{2}+b^{2}-2cb\cos(\angle)}\leq c+b\leq c+a.$

Next, for general $\beta$ and $m\in\mathbb{N}$, we distribute $m+1$ equi-
distant points $x_{j}$ (with $x_{0},x_{m}$ being corners) on the line-segment
$C$, and connect each $x_{j}$ with $f$ by a straight line. This way we obtain
$m$-many sub-trapezoids with corners in intersection points of $\beta$ with
the rays $r_{j}$. Let the sides of the $j$th such trapezoid be denoted by
$A_{j},B_{j},C_{j},D_{j}$ as depicted in the right-hand side of Figure 3, and
their lengths by $a_{j},b_{j},c_{j},d_{j}$ respectively. Note that the slope
$A_{j}$ is bigger than that of $A$, and the bottom sides $C_{j}$ are of length
smaller than $c/m$. Thus the length of the diagonal $\rho_{j}$ of this sub-
trapezoid satisfies

$\mbox{length}(\rho_{j})\leq
c_{j}+\max\\{a_{j},b_{j}\\}\leq\frac{c}{m}+a_{j}^{\prime},$

where $a_{j}^{\prime}$ is the length of the projection of $A_{j}$ onto $A$. We
sum both sides over $j$, and as $m$ increases to infinity, the right hand side
always sums to $c+a$, but the left hand side will converge to the length of
$\beta$. ∎

We remark that Lemma 5 extends to the case where $d>c$, the roles of $A$ and
$B$ are interchanged, by mirror symmetry.

Figure 3. The setting for Lemma 5.

We now proceed with the proof of Proposition 1, starting with some notation.

If $w=\gamma(\phi_{w},\theta_{w})$, then due to symmetry we can restrict
ourselves to $\phi_{w},\theta_{w}\in(0,\pi/2]$ and $t\in[0,1)$. For if
$\sin(\theta_{w})=0$, then $w$ is one of the poles $p_{n}$ or $p_{s}$ and
$\beta$ is contained in a straight line-segment with length bounded by 2.

In the following we refer to the ‘northern separation’ as the boundary between
the north pole cap and the equatorial belt, i.e.
$\mathbb{S}^{2}\cap\\{z=2/3\\}$, and the ‘northern region’ as the north pole
cap. The ‘southern separation’ and ‘southern region’ are defined analogously.

Before we proceed by case distinction, we will introduce some points of
interest:

$p_{top}:=\gamma\big{(}\phi_{w},\lvert\arccos(t)-\theta_{w}\rvert\big{)},\hskip
8.5359ptp_{bottom}:=\gamma\big{(}\phi_{w},\arccos(t)+\theta_{w}\big{)}\in\partial
C(w,t)$

are closest to the north and south pole respectively. Let
$M_{w}\in\mathcal{SO}(3)$ denote the rotation matrix, with axis of rotation
given by $w$ and rotation angle of $\frac{\pi}{2}$. Set

$p_{left}:=M_{w}(p_{top}),\hskip 14.22636ptp_{right}:=M_{w}(p_{bottom}),$

and note that both points have the same theta-angle $\theta_{*}$. Thus if we
cut $C(w,t)$ by great circles going through $p_{top},p_{bottom}$ and
$p_{left},p_{right}$, we obtain four parts of equal area. If $\partial C(w,t)$
crosses the northern separation, then it does so at

$\displaystyle p_{ins1}$
$\displaystyle:=\gamma\Big{(}\phi_{w}-\arccos\Big{(}\frac{3t-2c_{w}}{\sqrt{5}s_{w}}\Big{)},\arccos\big{(}\frac{2}{3}\big{)}\Big{)},$
$\displaystyle p_{ins2}$
$\displaystyle:=\gamma\Big{(}\phi_{w}+\arccos\Big{(}\frac{3t-2c_{w}}{\sqrt{5}s_{w}}\Big{)},\arccos\big{(}\frac{2}{3}\big{)}\Big{)}.$

(These points were obtained using parametrizations (4) and (5).) This implies
that moving from $p_{top}$ to $p_{bottom}$ we leave the northern part at
$p_{ins1}$. We will use the image under $\Gamma$ of the points above (see
Figure 4), and we will denote them

$p^{\Gamma}_{j}=\Gamma(p_{j})\hskip 28.45274pt\mbox{for}\hskip
28.45274ptj\in\big{\\{}top,bottom,left,right,ins1,ins2\big{\\}},$

and denote by $\beta_{1,2}$ the curves which are the image of the
parametrizations (4), (5) under $\Gamma$ – note that it is not necessary to
differentiate between $\beta_{1}$ and $\beta_{2}$; even though they will
behave different in general, the bounds we give are valid for both. Thus in
the sequel it is enough to consider the curve $\beta_{1}$ and double bounds in
the end, when we talk about $\beta=\Gamma(\partial C)$.

We will next list all cases we have to consider in order to complete the proof
and proceed thereafter by case distinction. Cases that follow by symmetry
(i.e. in the southern region) will not be considered.

I. Assume the cap satisfies $C(w,t)\subset C(\gamma(\phi,\frac{\pi}{2}),0)$
for some $\phi$.

Ia) The cap is contained in the equatorial belt.

Ib) The cap is contained in the northern region.

Ic) The cap intersects the equatorial belt and the northern region, but

$p^{\Gamma}_{left},p^{\Gamma}_{right}$ are contained in the equatorial belt.

Id) The cap intersects the equatorial belt and the northern region, where

$p^{\Gamma}_{left},p^{\Gamma}_{right}$ are contained in the northern region.

Ie) The cap intersects all regions.

II. Assume the cap $C(w,t)$ contains only one pole, say the north pole.

IIa) The cap is contained in the equatorial belt.

IIb) The cap is contained in the northern region.

IIc) The cap intersects the equatorial belt and the northern region, but

$p^{\Gamma}_{left},p^{\Gamma}_{right}$ are contained in the equatorial belt.

IId) The cap intersects the equatorial belt and the northern region, where

$p^{\Gamma}_{left},p^{\Gamma}_{right}$ are contained in the northern region.

IIe) The cap intersects all regions.

Before we start we want to state some additional properties of $\beta$ that
will be useful. By definition of the projection $\Gamma$, the curve $\beta$ is
contained in the rectangle $R=[0,2]\times[-1/2,1/2]$. The equator corresponds
a vertical line at height $0$. The southern and northern separation lines are
given by vertical lines at height $-1/4$ and $1/4$ respectively.

Given $p_{j}^{\Gamma}$ and $p_{k}^{\Gamma}$, where
$j,k\in\big{\\{}top,bottom,left,right,ins1,ins2\big{\\}}$, we use $|\langle
p_{j}^{\Gamma}-p_{k}^{\Gamma},e_{1}\rangle|$ to denote the difference in the
$x$-axis of the line inside the cap (after applying $\Gamma$). Note that due
to the periodicity this is a slight abuse of notation.

Case Ia):

$\beta$ is a function of the $y$-coordinate and monotone between the points
$(p^{\Gamma}_{top},p^{\Gamma}_{left})$,
$(p^{\Gamma}_{left},p^{\Gamma}_{bottom})$,
$(p^{\Gamma}_{bottom},p^{\Gamma}_{right})$, and
$(p^{\Gamma}_{right},p^{\Gamma}_{top})$. The difference of the height of any
two of these points is bounded by $1/4$, while the width between
$p_{right}^{\Gamma}$ and $p_{left}^{\Gamma}$ is bounded by $2$. Monotonicity
and the above bounds for the height and width yield a length bound for any of
the above ‘sectors’ of $1+1/4$, so $\mbox{length}(\beta)\leq 5$.

Case Ib):

Note that the images of boundaries of hemispheres going through the north and
south poles are mapped to polygons; and in the northern region, the situation
is like the setup in Lemma 5 with $f=\Gamma(p_{n})$. Since hemispheres go
through $\partial C(w,t)$ at most twice, we just have to cut $C(w,t)$ into
four parts of equal area as mentioned further above in this proof, and
consider the parts of $\beta$ belonging to these four pieces, and apply Lemma
5 four times. Since only the height and width of the image of $\beta$ matter
for the bound of the lemma, we use the maximal slope 1 and set

$a=2\sqrt{2}\ \langle
p^{\Gamma}_{top}-p^{\Gamma}_{bottom},e_{2}\rangle\leq\frac{1}{\sqrt{2}},\hskip
8.5359pt$

and

$c=2\lvert\langle p^{\Gamma}_{left}-p^{\Gamma}_{right},e_{1}\rangle\rvert\leq
4.$

Thus

$\mbox{length}(\beta)\leq a+c=4+\frac{1}{\sqrt{2}}.$

Figure 4. The setting for case Ic).

Case Ic):

In the northern region we proceed as in the case Ib), where we use

$\displaystyle a_{1}=2\sqrt{2}\ \langle
p^{\Gamma}_{top}-p_{ins1}^{\Gamma},e_{2}\rangle\qquad\text{and}\qquad
c_{1}=\lvert\langle p^{\Gamma}_{ins1}-p^{\Gamma}_{ins2},e_{1}\rangle\rvert.$

Two applications of Lemma 5 yield a bound of $a_{1}+c_{1}$ for the northern
part. (Note that $\langle
p^{\Gamma}_{top}-p_{ins1}^{\Gamma},e_{2}\rangle=\langle
p^{\Gamma}_{top}-p_{ins2}^{\Gamma},e_{2}\rangle$, since both
$p^{\Gamma}_{ins1}$ and $p^{\Gamma}_{ins2}$ have the same height.)

The part of $\beta$ falling into the equatorial belt is a function of the
$y$-coordinate, first monotonously decreasing from $p^{\Gamma}_{ins1}$ to
$p^{\Gamma}_{left}$, and then monotonously increasing from $p^{\Gamma}_{left}$
to $p^{\Gamma}_{bottom}$. So we can bound the length by

$\langle p^{\Gamma}_{ins1}-p^{\Gamma}_{left},e_{2}\rangle+|\langle
p^{\Gamma}_{ins1}-p^{\Gamma}_{left},e_{1}\rangle|=a_{2}+c_{2},$

and

$\langle p^{\Gamma}_{left}-p^{\Gamma}_{bottom},e_{2}\rangle+|\langle
p^{\Gamma}_{left}-p^{\Gamma}_{bottom},e_{1}\rangle|=a_{3}+c_{3}.$

In a similar way we obtain $a_{4},c_{4}$ and $a_{5},c_{5}$ for the parts of
$\beta$ which are ‘between’ $p^{\Gamma}_{bottom},p^{\Gamma}_{right}$ and
$p^{\Gamma}_{right},p^{\Gamma}_{ins2}$ respectively.

To obtain the final bound we estimate $\sum_{i=1}^{5}(a_{i}+c_{i})$. Thereto
we observe that $\sum_{i=1}^{5}c_{i}=2|\langle
p^{\Gamma}_{left}-p^{\Gamma}_{right},e_{1}\rangle|\leq 4$.

Moreover, $a_{1}\leq 1/\sqrt{2}$ and $\sum_{i=2}^{5}a_{i}=2\langle
p^{\Gamma}_{ins1}-p^{\Gamma}_{bottom},e_{2}\rangle\leq 1.$ This gives a total
bound of

$\text{length}(\beta)\leq 5+\frac{1}{\sqrt{2}}.$

Case Id):

This case is very similar to case Ic). To bound the ‘upper half’ of $\beta$,
i.e., the part above the line through $p^{\Gamma}_{left}$ and
$p^{\Gamma}_{right}$ we obtain by two applications of Lemma 5

$2\sqrt{2}\langle p^{\Gamma}_{top}-p^{\Gamma}_{left},e_{2}\rangle+|\langle
p^{\Gamma}_{left}-p^{\Gamma}_{right},e_{1}\rangle|=a_{1}+c_{1}.$

Moreover, the part between $p^{\Gamma}_{left}$ and $p^{\Gamma}_{ins1}$ is
bounded by Lemma 5 by

$\sqrt{2}\langle p^{\Gamma}_{left}-p^{\Gamma}_{ins1},e_{2}\rangle+|\langle
p^{\Gamma}_{left}-p^{\Gamma}_{ins1},e_{1}\rangle|=a_{2}+c_{2}.$

Similarly we define $a_{3},c_{3}$ for the part between $p^{\Gamma}_{right}$
and $p^{\Gamma}_{ins2}$.

The equatorial belt region is treated as before, yielding a bound of

$2\langle p^{\Gamma}_{ins1}-p^{\Gamma}_{bottom},e_{2}\rangle+|\langle
p^{\Gamma}_{ins1}-p^{\Gamma}_{ins2},e_{1}\rangle|=a_{4}+c_{4}.$

Note that $\sum_{i=1}^{4}c_{i}=2|\langle
p^{\Gamma}_{left}-p^{\Gamma}_{right},e_{1}\rangle|\leq 4$.

Further, $\sum_{i=1}^{3}a_{i}=2\sqrt{2}\langle
p^{\Gamma}_{top}-p^{\Gamma}_{ins1},e_{2}\rangle\leq 1/\sqrt{2}$ and $a_{4}\leq
1$. In the end we sum up everything and get the same bound as in case Ic).

Case Ie):

This case can be treated using the same arguments as for cases Ic) and Id).
The bound for the width, i.e., the sum of $c_{i}$’s, is still bounded by $4$.
However, since the cap also goes through the southern region the bound for the
height increases by $1/\sqrt{2}$, compared to the previous cases. In
conclusion we end up with $\mbox{length}(\beta)\leq 5+\sqrt{2}$.

Cases II*):

In the cases II*) the cap contains the north pole. It suffices to treat caps
where the pole is part of the interior of the cap, as the cases I*) cover the
cases where the pole is on the boundary.

Case IIa):

The curve $\beta_{1}$ is a function of the $y$-coordinate and is monotone
between the points $(p^{\Gamma}_{top},p^{\Gamma}_{bottom})$ \- note that the
co-domain of $\Gamma$ is a cylinder. Thus the $\mbox{length}(\beta_{1})$ in
this case is bounded by $3/2$. So the total bound in this case is $3$.

Case IIb):

We note that $\beta_{1}$ is monotonic between $p^{\Gamma}_{top}$ and
$p^{\Gamma}_{bottom}$. Hence Lemma 5 is applicable, and using the maximal
slope $1$ it follows

$\mbox{length}(\beta_{1})\leq 2\sqrt{2}\langle
p^{\Gamma}_{top}-p^{\Gamma}_{bottom},e_{2}\rangle+2\leq\frac{1}{\sqrt{2}}+2;$

Case IIc):

We use similar arguments as in cases Ic) and IIb). The total width is bounded
by $4$, whereas the height bound is $1/\sqrt{2}+1$. Thus
$\mbox{length}(\beta)\leq 5+1/\sqrt{2}$.

Case IId):

Similar as before we have a width bound of $4$ and a height bound of
$1+1/\sqrt{2}$, yielding $\mbox{length}(\beta)\leq 5+1/\sqrt{2}$.

Case IIe):

We use the same arguments as in cases Ie) and IIb) to obtain a bound of
$\mbox{length}(\beta)\leq 5+\sqrt{2}$.

This ends the case distinction and hence the proof of Proposition 1. ∎

###  5.3. Curvature calculations

For the proof of Corollary 1 we will now calculate the signed curvature
$\kappa$ of the planar curve $\Gamma(\partial C)\subset R$ and give a
universal bound on the number of zeros. Here $x$ and $y$ are the coordinates
of $\Gamma\circ\gamma\circ(\text{param.}\eqref{parametrization1})$ and
$x^{\prime}$ and $y^{\prime}$ denote the derivatives of $x$ and $y$ with
respect to $\theta$:

$\kappa=\frac{x^{\prime}y^{\prime\prime}-y^{\prime}x^{\prime\prime}}{\big{(}(x^{\prime})^{2}+(y^{\prime})^{2}\big{)}^{3/2}}.$

We see immediately that if $w$ is a pole, then $\kappa(\theta)\equiv 0$ since
the $y$ value is constant. Similarly, if $\partial C$ goes through both poles,
then $\kappa(\theta)\equiv 0$ since the $x$ value is constant. These caps are
treated separately in Corollary 1, and hence we assume in the subsequent
calculations that $\theta_{w}\in(0,\frac{\pi}{2}]$, and $t>0$ in case
$\theta_{w}=\frac{\pi}{2}$.

####  5.3.1. Equatorial belt region

From the definition of $\Gamma$ it follows that the part of $\Gamma(\partial
C)$ that belongs to the equatorial belt has the following parametrization
(note that $\sqrt{5}/3\leq\sin(\theta)\leq 1$):

$x(\theta)=\frac{1}{\pi}\arccos\Big{(}\frac{t-\cos(\theta)c_{w}}{\sin(\theta)s_{w}}\Big{)}+\frac{\phi_{w}}{\pi},$

and

$y(\theta)=\frac{3}{8}\cos(\theta).$

The derivatives needed for the curvature are as follows

$\displaystyle x^{\prime}$
$\displaystyle=\frac{1}{\pi}\frac{-\sin(\theta)s_{w}}{\sqrt{\sin(\theta)^{2}s_{w}^{2}-(t-\cos(\theta)c_{w})^{2}}}\frac{\sin(\theta)^{2}s_{w}c_{w}-(t-\cos(\theta)c_{w})\cos(\theta)s_{w}}{\sin(\theta)^{2}s_{w}^{2}}$
$\displaystyle=-\frac{1}{\pi A}\frac{c_{w}-t\cos(\theta)}{\sin(\theta)},$

where we use the abbreviation

$A=\sqrt{\sin(\theta)^{2}s_{w}^{2}-(t-\cos(\theta)c_{w})^{2}}.$

Further

$\displaystyle\pi x^{\prime\prime}$
$\displaystyle=\frac{\sin(\theta)\cos(\theta)s_{w}^{2}-(t-\cos(\theta)c_{w})\sin(\theta)c_{w}}{\big{(}\sin(\theta)^{2}s_{w}^{2}-(t-\cos(\theta)c_{w})^{2}\big{)}^{3/2}}\frac{c_{w}-t\cos(\theta)}{\sin(\theta)}$
$\displaystyle\hskip
28.45274pt-\frac{t\sin(\theta)^{2}-(c_{w}-t\cos(\theta))\cos(\theta)}{\sqrt{\sin(\theta)^{2}s_{w}^{2}-(t-\cos(\theta)c_{w})^{2}}\sin(\theta)^{2}}$
$\displaystyle=\frac{\big{(}\cos(\theta)-tc_{w}\big{)}\big{(}c_{w}-t\cos(\theta)\big{)}}{A^{3}}-\frac{t-c_{w}\cos(\theta)}{A\sin(\theta)^{2}}$

and

$\displaystyle y^{\prime}(\theta)=-\frac{3}{8}\sin(\theta)\hskip
14.22636pt\text{and}\hskip
14.22636pty^{\prime\prime}(\theta)=-\frac{3}{8}\cos(\theta).$

Thus $x^{\prime}y^{\prime\prime}-y^{\prime}x^{\prime\prime}=$

$\displaystyle\frac{3}{\pi
8A}\Big{(}\big{(}c_{w}-t\cos(\theta)\big{)}\big{(}\cot(\theta)+\big{(}\cos(\theta)-tc_{w}\big{)}\frac{\sin(\theta)}{A^{2}}\big{)}-\frac{t-c_{w}\cos(\theta)}{\sin(\theta)}\Big{)}$
$\displaystyle=\frac{3}{\pi
8A}\Big{(}\cot(\theta)2c_{w}+\big{(}\cos(\theta)-tc_{w}\big{)}\big{(}c_{w}-t\cos(\theta)\big{)}\frac{\sin(\theta)}{A^{2}}-\frac{t(1+\cos(\theta)^{2})}{\sin(\theta)}\Big{)},$

and

$x^{\prime 2}+y^{\prime
2}=\frac{1}{\pi^{2}}\frac{1}{A^{2}}\frac{\big{(}c_{w}-t\cos(\theta)\big{)}^{2}}{\sin(\theta)^{2}}+\frac{9}{64}\sin(\theta)^{2}.$

Assuming $A\neq 0$, we obtain

$\kappa(\theta)=\frac{3A^{2}\Big{(}\cot(\theta)2c_{w}+\frac{1}{A^{2}}\big{(}\cos(\theta)-tc_{w}\big{)}\big{(}c_{w}-t\cos(\theta)\big{)}\sin(\theta)-\frac{t(1+\cos(\theta)^{2})}{\sin(\theta)}\Big{)}}{\pi
8\Big{(}\frac{1}{\pi^{2}}\frac{\big{(}c_{w}-t\cos(\theta)\big{)}^{2}}{\sin(\theta)^{2}}+A^{2}\frac{9}{64}\sin(\theta)^{2}\Big{)}^{\frac{3}{2}}.}$

This equation can be continuously extended to $A=0$. By the trigonometric
angle sum formula,

$\displaystyle A^{2}$
$\displaystyle=\big{[}\sin(\theta)s_{w}-t+\cos(\theta)c_{w}\big{]}\big{[}\sin(\theta)s_{w}+t-\cos(\theta)c_{w}\big{]}$
$\displaystyle=\big{[}\cos(\theta-\theta_{w})-t\big{]}\big{[}t-\cos(\theta+\theta_{w})\big{]}$

is zero only for
$\theta\in[\arccos(\tfrac{2}{3}),\arccos(-\tfrac{2}{3})]\cap\\{\arccos(t)+\theta_{w},\lvert\arccos(t)-\theta_{w}\rvert\\}.$
We also make sure that $c_{w}-t\cos(\theta)$ is not zero when $A$ is, thus
plugging in $\theta=\arccos(t)+\theta_{w}$ and
$\theta=\lvert\arccos(t)-\theta_{w}\rvert$:

$\displaystyle c_{w}-t(c_{w}t-s_{w}\sqrt{1-t^{2}})$
$\displaystyle=c_{w}(1-t^{2})+s_{w}t\sqrt{1-t^{2}},$ $\displaystyle
c_{w}-t(c_{w}t+s_{w}\sqrt{1-t^{2}})$
$\displaystyle=\sqrt{1-t^{2}}\sin\big{(}\arccos(t)-\theta_{w}\big{)}.$

Since $0\leq t<1$, the first value above is always positive, while the second
is not zero since $\theta=\arccos(t)-\theta_{w}\in\\{0,\pi\\}$ is not in the
domain of the parametrization.

Thus the question if the curvature changes sign is reduced to finding $\theta$
such that

$A^{2}\cos(\theta)2c_{w}+\sin(\theta)^{2}\big{(}\cos(\theta)-tc_{w}\big{)}\big{(}c_{w}-t\cos(\theta)\big{)}-A^{2}t(1+\cos(\theta)^{2})=0$

which can be expanded in the notation $\sin(\theta)=s_{\theta}$,
$\cos(\theta)=c_{\theta}$ as

$\displaystyle
2c_{\theta}c_{w}s_{\theta}^{2}s_{w}^{2}-2c_{\theta}c_{w}t^{2}+4tc_{\theta}^{2}c_{w}^{2}-2c_{\theta}^{3}c_{w}^{3}+s_{\theta}^{2}c_{\theta}c_{w}-tc_{\theta}^{2}s_{\theta}^{2}-tc_{w}^{2}s_{\theta}^{2}+t^{2}c_{\theta}c_{w}s_{\theta}^{2}$
$\displaystyle-
ts_{\theta}^{2}s_{w}^{2}+t^{3}-2t^{2}c_{\theta}c_{w}+tc_{\theta}^{2}c_{w}^{2}-tc_{\theta}^{2}s_{\theta}^{2}s_{w}^{2}+t^{3}c_{\theta}^{2}-2t^{2}c_{\theta}^{3}c_{w}+tc_{\theta}^{4}c_{w}^{2}=0.$

Using that $s_{\theta}^{2}=1-c_{\theta}^{2}$, we see that this is a fourth
degree polynomial in $c_{\theta}$ and has at most 4 roots for
$c_{\theta}\in[-\tfrac{2}{3},\tfrac{2}{3}]$. Therefore, there are at most $8$
zeros of curvature.

####  5.3.2. North and south pole caps

Here we discuss the curvature of $\Gamma(\partial C)$ in the north and south
pole caps. From the definition of $\Gamma$ it follows that the part of
$\Gamma(\partial C)$ that falls in the north pole cap can be parametrized as
follows. (The parametrization of the south pole cap is analogous, so we just
focus on the north pole cap.)

$x(\theta)=\frac{\phi}{\pi}-\frac{1}{\pi}\big{(}1-\sqrt{1-\cos(\theta)}\sqrt{3}\big{)}\cdot(\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}),$

and by trigonometric half-angle identities

$y(\theta)=\frac{1}{4}\big{(}2-\sqrt{1-\cos(\theta)}\sqrt{3}\big{)}=\frac{1}{2}-\sin\Big{(}\frac{\theta}{2}\Big{)}\frac{\sqrt{6}}{4}.$

It follows that

$\displaystyle
y^{\prime}(\theta)=-\cos\Big{(}\frac{\theta}{2}\Big{)}\frac{\sqrt{6}}{8}\hskip
14.22636pt\text{and}\hskip
14.22636pty^{\prime\prime}(\theta)=\sin\Big{(}\frac{\theta}{2}\Big{)}\frac{\sqrt{6}}{16}.$

As for the derivative of $x$, note that the factor $\phi\mod\frac{\pi}{2}$ can
be written as $\phi(\theta)-j\frac{\pi}{2}$ for appropriate $j$ and $\theta$,
thus in the derivative we can ignore that part:

$\displaystyle x^{\prime}$
$\displaystyle=\frac{\phi^{\prime}}{\pi}\Big{(}1-1+\sqrt{1-\cos(\theta)}\sqrt{3}\Big{)}-\frac{4y^{\prime}}{\pi}\big{(}\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}$
$\displaystyle=16\frac{\phi^{\prime}y^{\prime\prime}}{\pi}-\frac{4y^{\prime}}{\pi}\big{(}\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}$

and thus, making use of the fact that
$y^{\prime\prime\prime}=\frac{1}{4}y^{\prime}$,

$\displaystyle x^{\prime\prime}$
$\displaystyle=16\frac{\phi^{\prime\prime}y^{\prime\prime}-\phi^{\prime}y^{\prime}/4}{\pi}-\frac{4y^{\prime\prime}}{\pi}\big{(}\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}-\frac{4y^{\prime}\phi^{\prime}}{\pi}$
$\displaystyle=\frac{16}{\pi}\phi^{\prime\prime}y^{\prime\prime}-\frac{4y^{\prime\prime}}{\pi}\big{(}\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}-\frac{8}{\pi}y^{\prime}\phi^{\prime}.$

Note that the term

$(y^{\prime})^{2}=\frac{3}{8^{2}}(1+\cos(\theta))$

is zero only if $\theta=\pi$, but since we restricted ourselves to the case
$0\leq\theta_{w}\leq\frac{\pi}{2}$ and $0\leq t<1$ due to symmetry, this would
mean that $t=0$ and $\theta_{w}=\frac{\pi}{2}$, but these caps can be
disregarded here because they are dealt with separately in Corollary 1. Thus

$\kappa(\theta)=\frac{16\frac{\phi^{\prime}(y^{\prime\prime})^{2}}{\pi}-\frac{16}{\pi}\phi^{\prime\prime}y^{\prime\prime}y^{\prime}+\frac{8}{\pi}(y^{\prime})^{2}\phi^{\prime}}{\Big{[}\Big{(}16\frac{\phi^{\prime}y^{\prime\prime}}{\pi}-\frac{4y^{\prime}}{\pi}\big{(}\phi\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}\Big{)}^{2}+\frac{3}{8^{2}}(1+\cos(\theta))\Big{]}^{3/2}}.$
(8)

To show that the curvature is well defined, we proceed as in the previous
section - with one exception: if the north pole is in $\partial C$, then
$\theta=0$ is in the domain of parametrization. If this case occurs, then we
can use the parametrization (6) and obtain subsequently with
$\tau=\frac{t}{\sqrt{1-t^{2}}}$ (note that $t=0$ is excluded, because
$\theta_{w}=\frac{\pi}{2}$ in that case):

$\phi^{\prime}=-\frac{1}{2}\frac{\tau+\tau\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}}{\sqrt{1-\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}}}$

and using the product formula for the derivative,

$\displaystyle\phi^{\prime\prime}$
$\displaystyle=-\frac{\tau}{4}\frac{\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}\big{(}1+\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\big{)}}{\Big{(}1-\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\Big{)}^{3/2}}\big{(}1+\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\big{)}-\frac{\tau}{2}\frac{\tan\big{(}\tfrac{\theta}{2}\big{)}\big{(}1+\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\big{)}}{\sqrt{1-\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}}}$
$\displaystyle=-\frac{\tau}{2}\frac{\tan\big{(}\tfrac{\theta}{2}\big{)}\big{(}1+\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\big{)}}{\sqrt{1-\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}}}\left(\frac{\tau^{2}}{2}\frac{\big{(}1+\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}\big{)}}{1-\tau^{2}\tan\big{(}\tfrac{\theta}{2}\big{)}^{2}}+1\right).$

Thus the curvature is hence well defined for
$0<\theta<2\arctan\big{(}\frac{\sqrt{1-t^{2}}}{t}\big{)}$ and can be
continuously extended to zero by

$\kappa(0)=\frac{16\frac{\phi^{\prime}\cdot 0}{\pi}-\frac{16}{\pi}\cdot 0\cdot
y^{\prime\prime}y^{\prime}-\frac{8}{\pi}\frac{6}{8^{2}}\frac{\tau}{2}}{\Big{[}8^{2}\tau^{2}\frac{\phi^{\prime}\cdot
0}{\pi}+\frac{6}{4\pi^{2}}\big{(}\phi_{w}\mod\tfrac{\pi}{2}-\tfrac{\pi}{4}\big{)}^{2}+\frac{6}{8^{2}}\Big{]}^{3/2}}\leq-\frac{2^{3}}{\pi\sqrt{3}}\frac{t}{\sqrt{1-t^{2}}}.$

A similar calculation, using the parametrization (7), yields that $\theta=\pi$
can be treated in the same fashion. We hence also know that the curvature is
not zero for $\theta\in\\{0,\pi\\}$, and by continuity, also not in an
neighborhood of these values.

The curvature $\kappa(\theta)$ thus changes sign, if at all, at

$\frac{16\phi^{\prime}}{\pi}(y^{\prime\prime})^{2}-\frac{16}{\pi}\phi^{\prime\prime}y^{\prime\prime}y^{\prime}+\frac{8\phi^{\prime}}{\pi}(y^{\prime})^{2}=0.$

We note that

$y^{\prime\prime}y^{\prime}=-\sin(\theta)\frac{3}{128}\hskip
14.22636pt\mbox{and}\hskip
14.22636pt(y^{\prime\prime})^{2}=\frac{3}{16^{2}}(1-\cos(\theta)),$

thus we equivalently want, letting $\xi=\frac{\phi}{\pi}$ and multiplying by
$\sin(\theta)A^{3}$,

$\sin(\theta)A^{3}\left(\xi^{\prime}\frac{3}{16}(1-\cos(\theta))+\frac{3\sin(\theta)}{8}\xi^{\prime\prime}+\frac{3}{8}(1+\cos(\theta))\xi^{\prime}\right)=0;$

or if we multiply by $\frac{16}{3}$

$\sin(\theta)A^{3}\Big{(}2\sin(\theta)\xi^{\prime\prime}+(3+\cos(\theta))\xi^{\prime}\Big{)}=0.$

Next we use the expansion of $\xi^{\prime}=x^{\prime}(\theta)$ (this refers to
the $x$ in §5.3.1) to obtain a polynomial in $c_{\theta}$ of degree at most
five which has at most 5 roots for $c_{\theta}\in[\tfrac{2}{3},1]$.

####  5.3.3. Curvature for the other parametrization

If we had chosen to work with parametrization (5) instead, then in the
equatorial belt region only the sign of $\kappa$ would have changed, as the
derivatives of the $x$-values flip signs. In the polar cap regions the
curvatures of the two parametrizations have opposing signs as can be seen from
formula (8), and are zero for the same values $\theta_{0}$. In either region,
a zero for the curvature of one paramatrization is also a zero for the other.
Since the $y$-values are the same for both parametrizations, such zeros have
the same $y$-value.

Note that the value of 36 in Corollary 1 is obtained by summing the total
number of zeros of curvature for one parametrization, and then doubling it.

##  6\. Appendix: Formulas for Boundaries and Centers of Pixels

Here we detail (for the reader’s convenience) an indexing of pixels in the
HEALPix tessellation at an arbitrary level $\ell$, and give formulas for their
centers, in other words the HEALPix point set. This is an alternative to the
indexing presented in [14] and may be useful for programming.

As before, we use $\theta\in[0,\pi)$ to denote angle with the north pole, so
$z=\cos(\theta)$. $\phi\in[0,2\pi)$ denotes the angle with the $x$ axis on the
$xy$-plane. We define a pixel by $(s,k,\ell,r,c)$. Each index is described
below.

  * •

$s\in\\{-1,0,1\\}$ denotes whether the pixel is one of the north base pixels,
one of the equatorial base pixels, or one of the south base pixels ($s=1$,
$s=0$, $s=-1$, respectively).

  * •

$k\in\\{0,1,2,3\\}$ defines which of the four base pixels on level $s$ the
pixel is in. For $s=\pm 1$, $k=0$ corresponds to the base pixel whose boundary
touches $z=\pm\frac{2}{3}$ at the points $\phi=0$ and $\phi=\frac{\pi}{2}$.
For $s=0$, $k=0$ corresponds to the base equatorial pixel centered on the arc
$\phi=0$. For $k>0$, this value of $k$ indicates a rotation by
$\frac{k\pi}{2}$ radians in $\phi$.

  * •

$\ell\in\mathbb{N}_{0}$ denotes the resolution of the pixelation. In each base
pixel, there are $4^{\ell}$ pixels of resolution $\ell$, in a grid with
$2^{\ell}$ rows and $2^{\ell}$ columns.

  * •

$r\in\\{1,\cdots,2^{\ell}\\}$ indexes the $2^{\ell}$ parallels to the
northeast boundary in the grid of subpixels of the base pixel. In the north
pole cap and equatorial belt, the indexing starts on the northeastern side of
the base pixel and ends at the southwestern side; $r=1$ denotes the pixels
that have the northeastern boundary of the base pixel as their boundary. In
the south pole cap, the indexing starts on the southeastern side of the base
pixel and ends at the northwestern side.

  * •

$c\in\\{1,\cdots,2^{\ell}\\}$ indexes the $2^{\ell}$ parallels to the
northwest boundary in the grid of subpixels of the base pixel. In the north
pole cap and equatorial belt, the indexing starts on the northwestern side of
the base pixel; $c=1$ denotes the pixels that have the northwestern boundary
of the base pixel as their boundary. In the south pole cap, the indexing
starts on the southwestern side of the base pixel and ends at the northeastern
side.

_Example._ In Figure 5 below, assume that $\phi=0$ is the arc on which the
dark gray base pixel in the picture is centered, and that the north pole is
the top vertex of the light gray base pixel. Then the pixel shaded in red has
index $(1,0,3,5,3)$.

Figure 5.  ©AAS. Reproduced (with slight modification) with kind permission
from the authors of [14] and the Astrophysical Journal. See DOI:
10.1086/427976.

Write $L=2^{\ell}$. The pixel boundaries of resolution parameter $\ell$ are
obtained via curves $m^{e}_{j,\ell}$ from north to south, and curves
$p^{e}_{j,\ell}$ from south to north. Here we use a slightly different
indexing system from that used in §2.2. Let $\phi_{k}=\phi-\frac{k\pi}{2}$.
Then

$m_{j,k,\ell}^{e}\sim\cos(\theta)=\frac{2}{3}-\frac{4j}{3L}-\frac{8\phi_{k}}{3\pi}\hskip
14.22636pt\text{ and }\hskip
14.22636ptp_{j,k,\ell}^{e}\sim\cos(\theta)=\frac{2}{3}-\frac{4j}{3L}+\frac{8\phi_{k}}{3\pi}.$

A pixel’s center $(z,\phi)$ is given by the shared vertex of the four
subpixels of pixel $(s,k,\ell,r,c)$ in the next-finest tessellation at level
$\ell+1$. We give explicit formulas below.

###  6.1. Pixel centers contained in the equatorial belt

####  6.1.1. Pixels with s = 0

Let $s=0$ in the pixel indexing, so that the base pixel it is contained in
lies entirely in the equatorial belt. The center of pixel $(0,k,\ell,r,c)$ ,
occurs at intersection point of the lines $m_{(2r-1),k,\ell+1}$ and
$p_{(2c-1),k,\ell+1}$, which is at

$\phi=\frac{\pi(r-c)}{4L}+\frac{k\pi}{2}$

and

$z=\frac{2}{3}+\frac{2(r+c-1)}{3L}.$

####  6.1.2. Pixels with s = 1

We now describe centers of pixels of the form $(1,k,\ell,r,c)$ which are
contained entirely in the equatorial belt, which occurs when $r+c>L+1$. (For
the $s=-1$ case, the pixel centers are obtained by simply changing the sign of
the $z$-value.)

The pixel’s center $(z,\phi)$ is given by the shared vertex of the four
subpixels of pixel $(1,k,\ell,r,c)$ in the next-finest tessellation at level
$\ell+1$. This occurs at intersection point of the lines
$m_{(2r-1),(k+1)_{4},\ell+1}$ and $p_{(2c-1),k,\ell+1}$, which is at

$\phi=\frac{\pi(r-c)}{4L}+\frac{(2k+1)\pi}{4}$

and

$z=\frac{4}{3}-\frac{2(r+c-1)}{3L}.$

###  6.2. Pixels contained in north and south caps or on their boundaries

We concern ourselves only with the pixel centers that lie in the north pole
cap or on its boundary, which occurs when $r+c\leq L+1$ (again, the centers
for pixels in the south pole cap are obtained by changing the sign of the
$z$-value).

The center of pixel $(1,k,\ell,r,c)$ is given by the intersection of the
curves $p_{2c-1,k,\ell}^{n}$ and $m_{2r-1,k,\ell}^{n}$, which occurs at

$\phi=k\frac{\pi}{2}+\frac{\pi(2c-1)}{4(r+c-1)}$

and

$z=1-\frac{(r+c-1)^{2}}{3L^{2}}.$

## Acknowledgements

The first author is supported by long term structural funding – Methusalem
grant of the Flemish Government; the Austrian Science Fund (FWF): F5503
“Quasi-Monte Carlo Methods”; and FWF: W1230 “Doctoral School Discrete
Mathematics.” The second author is supported by Deutsche
Forschungsgemeinschaft (DFG) within project 432680300 - SFB 1456 (subproject
B02) and the Johannes Kepler University Linz. The third author is supported by
DMS-2054606 through the US National Science Foundation. The authors thank Ryan
Matzke for suggesting we collaborate and for many discussions on the subjects
presented in this paper, including substantial work on the material in the
appendix. We also thank Dmitriy Bilyk for helpful comments and suggestions. We
thank K.M. Górski, E. Hivon, A.J. Banday, B.D. Wandelt, F.K. Hansen, M.
Reinecke and M. Bartelmann for the permission to use their graphics, as well
as AAS publishing and The Astrophysical Journal.

## References

  * [1] Aistleitner, C., Brauchart, J.S., Dick, J.: Point Sets on the Sphere $\mathbb{S}^{2}$ with Small Spherical Cap Discrepancy. Discrete Comput. Geom. 48, no. 4, 990–1024 (2012). https://doi.org/10.1007/s00454-012-9451-3
  * [2] Alishahi, K., Zamani, M.: The spherical ensemble and uniform distribution of points on the sphere. Electron. J. Probab. 20, 23–27 (2015).https://doi.org/10.1214/EJP.v20-3733
  * [3] Beck, J.: Sums of distances between points on a sphere—an application of the theory of irregularities of distribution to discrete geometry. Mathematica 31, no. 1, 33–41 (1984). https://doi.org/10.1112/S0025579300010639
  * [4] Beck, J.: Some upper bounds in the theory of irregularities of distribution. Acta Arithmetica 43, no. 2, 115-130 (1984). https://doi.org/10.4064/aa-43-2-115-130
  * [5] Beck, J., Chen, W.L.: Irregularities of Distribution. Cambridge University Press, Cambridge, 1987.
  * [6] Beltrán, C., Etayo, U.: The Diamond ensemble: A constructive set of spherical points with small logarithmic energy. J. Complex. 59, 101471 (2020). https://doi.org/10.1016/j.jco.2020.101471
  * [7] Beltrán, C., Marzo, J., Ortega-Cerdà, J.: Energy and discrepancy of rotationally invariant determinantal point processes in high dimensional spheres. J. Complex 37, 76-109 (2016). https://doi.org/10.1016/j.jco.2016.08.001
  * [8] Brauchart, J., Grabner, P.: Distributing many points on spheres: Minimal energy and designs. J. Complex. 31, no. 3, 293-326 (2015). https://doi.org/10.1016/j.jco.2015.02.003
  * [9] Borodachov, S., Hardin, D., Saff, E.: Discrete Energy on Rectifiable Sets, Springer (2019).
  * [10] Bondarenko, A., Radchenko, D., Viasovska, M.: Well separated spherical designs. Constr. Approx. 41, no. 1, 93–112 (2014). https://doi.org/10.1007/s00365-014-9238-2
  * [11] Chen, W.L., Srivastav, A., Travaglini, G.: A Panorama of Discrepancy Theory. Lecture Notes in Mathematics 2107 (2014).
  * [12] Etayo, U.: Spherical Cap Discrepancy of the Diamond Ensemble. Discrete Comput. Geom. 66, 1218-1238 (2021). https://doi.org/10.1007/s00454-021-00305-4
  * [13] Ferizović, D.: Spherical cap discrepancy of perturbed lattices under the Lambert projection. Preprint 2022. https://arxiv.org/pdf/2202.13894.pdf
  * [14] Górski, K.M., Hivon, E., Banday, A.J., Wandelt, B.D., Hansen, F.K., Reinecke, M., Bartelmann, M.: HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere. Astrophys. J. 622, 759-771 (2005). https://doi.org/10.1086/427976
  * [15] Hardin, D.P., Michaels, T., Saff, E.B.: A Comparison of Popular Point Configurations on $\mathbb{S}^{2}$. Dolomites Research Notes on Approximation 9, 16-49 (2016). https://doi.org/10.14658/pupj-drna-2016-1-2
  * [16] Kuijlaars, A.B.J., Saff, E.B.: Distributing many points on a sphere. Math. Intell. 19, 5–11 (1997). https://doi.org/10.1016/j.jco.2015.02.003
  * [17] Matousek, J.: Geometric Discrepancy: An Illustrated Guide. Algorithms and Comb. 18 (2010).
  * [18] Lubotzky, A., Phillips, R., Sarnak, P.: Hecke Operators and Distributing Points on the Sphere I. Commun. Pure Appl. Math. 39 (1968). https://doi.org/10.1002/cpa.3160390710
  * [19] Rakhmanov, E.A., Saff, E.B., Zhou, Y.M.: Minimal discrete energy on the sphere. Math. Res. Lett. 1, 647-662 (1994). https://dx.doi.org/10.4310/MRL.1994.v1.n6.a3
  * [20] Sauer, N.: On the density of families of sets, J. Comb. Theory, Series A (1972). https://doi.org/10.1016/0097-3165(72)90019-2
  * [21] Shelah, S.: A combinatorial problem; stability and order for models and theories in infinitary languages. Pac. J. Math. (1972). https://doi.org/10.2140/pjm.1972.41.247