The main goal of this vignette is to show that there are homeomorphisms \[\begin{equation*} A_n ~~ \longleftrightarrow ~~ \partial Z_n ~~ \longleftrightarrow ~~ \mathbb{S}^{2n} \end{equation*}\] where \(A_n\) is a certain space of arcs in the circle \(\mathbb{S}^1\), and \(\partial Z_n\) is the boundary of a polar zonoid. Both of these spaces are defined below. \(\mathbb{S}^{2n}\) is the unit sphere in \(\mathbb{R}^{2n+1}\).
Sections 2 and 3 cover general zonoids, and the remaining sections specialize to the polar zonoid.
Warning: The term polar zonoid was chosen because these bodies are a generalization of the polar zonohedron in \(\mathbb{R}^{3}\), see [4]. In other contexts, i.e. the theory of convex bodies, the term “polar zonoid” is short for “polar of a zonoid”, which is an entirely different, and much more advanced, concept, see [10], p. 585.
For this package we only consider zonoids defined by generating functions in \(L^1( \mathbb{S}^1 )\), where the unit circle \(\mathbb{S}^1\) has the usual Lebesgue measure \(\mu\). There is nothing special about \(\mathbb{S}^1\); any interval \([a,b]\) will do. I do not know whether more exotic zonoids exist, but suspect they do not. For a very good survey of the theory of zonoids, see [2].
Let \(w_1, w_2, ..., w_m\) be absolutely integrable functions from \(\mathbb{S}^1\) to \(\mathbb{R}\), i.e. each \(w_i \in L^1( \mathbb{S}^1 )\). For \(\theta \in \mathbb{S}^1\), let \(w(\theta) := (w_1(\theta), ... , w_m(\theta)) \in \mathbb{R}^m\). The letter \(w\) denotes “weight”. We also assume these simplifying properties: \[\begin{equation} w(\theta) \ne 0 ~~ \text{for almost all } \theta ~~~~~~~ \text{and} ~~~~~~ w \in L^\infty( \mathbb{S}^1, \mathbb{R}^m ) \label{eq:assume2} \end{equation}\] The second one simply means that \(w(\theta)\) is (essentially) bounded.
Define the zonoid \(Z_w\) by \[\begin{equation}\label{eqn:defZ1} Z_w := \left\{ \int_V w(\theta) \, d\theta ~|~ V \subseteq \mathbb{S}^1 \right\} ~~~=~~~ \left\{ \int_{\mathbb{S}^1} \mathbf{1}_{V}(\theta) w(\theta) \, d\theta ~|~ V \subseteq \mathbb{S}^1 \right\} ~ \subset ~ \mathbb{R}^m \end{equation}\]
where \(V\) varies over all measurable subsets of \(\mathbb{S}^1\). The function \(\mathbf{1}_{V}\) is the indicator function of \(V\). The functions \(w_1(\theta), ... , w_m(\theta)\) are called generating functions of \(Z_w\), and \(w(\theta)\) is called a generating function. The generating function \(w\) is far from unique. For example, if \(\lambda : \mathbb{S}^1 \to \mathbb{S}^1\) is measure preserving, then \(Z_{w \cdot \lambda} = Z_w\).
The function \(w(\theta)\) induces a vector measure on the circle: \(\mu_w(V) := \int_V w(\theta) \, d\theta\). This measure is atom free. The measure viewpoint gives a simpler alternative definition: \[\begin{equation}\label{eqn:defZ2} Z_w := \left\{ \mu_w(V) ~|~ V \subseteq \mathbb{S}^1 \right\} \end{equation}\]
where \(V\) varies over all measurable subsets of \(\mathbb{S}^1\). This is the classical definition of a general zonoid in [2], except with \(\mu_w\) replaced by an arbitrary atom free (finite) vector measure \(\nu\). Given a zonoid \(Z_\nu\) which is the range of \(\nu\), the measure \(\nu\) is not unique. It was shown in [8] that two zonoids are equal iff the total measures of the corresponding spaces are equal, and certain induced measures on the projective space \(\mathbb{R}\text{P}^{n-1}\) are equal. This was reproved in [2], Corollary 2.9. By a classical theorem of Lyapunov, every zonoid is convex and closed, see Theorem 5.5 of [9].
It is possible to formulate this from the topological viewpoint. Let \(\large\mathscr{V}\) be the \(\sigma\)-algebra of measurable subsets of \(\mathbb{S}^1\). We make \(\large\mathscr{V}\) into a metric space by identify \(V\) with its indicator function \(\mathbf{1}_{V} \subset L^1( \mathbb{S}^1 )\). So we can think of \(\large\mathscr{V}\) as a subspace of the metric space \(L^1( \mathbb{S}^1 )\) and let \(\large\mathscr{V}\) inherit the topology from the bigger space. Equivalently, we can make \(\large\mathscr{V}\) a metric space by defining \(d(V_1,V_2) := \mu( V_1 \triangle V_2 )\) = the Lebesgue measure of the symmetric difference of \(V_1, V_2\). In both viewpoints of the topology, subsets \(V_1\) and \(V_2\) are considered equal iff their symmetric difference is a null-set. Equivalently, when we write \(V_1 \ne V_2\) it means that their symmetric difference is not a null-set. We can now view \(\mu_w\) as a natural surjective map \[\begin{equation} \large\mathscr{V} ~~ \overset{\mu_w}{\longrightarrow} ~~ Z_w \label{eq:VtoZ_w} \end{equation}\] with the understanding that in this topological viewpoint, the “points” in \(\large\mathscr{V}\) are not subsets, but equivalence classes of subsets. The equivalence relation is discussed in more detail in [1], p. 53, where the metric is called the Fréchet-Nikodym metric. The map \(\mu_w\) is continuous and in fact K-Lipschitz where K = \(||w||_\infty\). The second property in \(\eqref{eq:assume2}\) is used here.
Now let \(Q^\infty\) be the set of measurable functions on \(\mathbb{S}^1\) whose essential range is in \([0,1]\). In fancier terms, \(Q^\infty\) is the non-negative part of the unit ball in \(L^\infty( \mathbb{S}^1 )\). The indicator functions \(\mathbf{1}_{V}\) are in \(Q^\infty\); in fact \(Q^\infty\) is analogous to a cube and the indicator functions \(\mathbf{1}_{V}\) are analogous to the vertices of that cube. It is an amazing fact that, in equation (\(\ref{eqn:defZ1}\)), if the vertices \(\mathbf{1}_{V}\) are replaced by arbitrary \(f \in Q^\infty\) the resulting set does not get any larger ! Therefore we also have: \[\begin{equation} Z_w = \left\{ \int_{\mathbb{S}^1} f(\theta) w(\theta) \, d\theta ~|~ f \in Q^\infty \right\} \end{equation}\]
This is another classic theorem of Lyapunov; for the proof, see Theorem 5.5 in [9]. In control theory this amazing fact is related to the “bang-bang principle”.
Remark. These concepts have a physical application in colorimetry. The variable \(\theta\) is wavelength, and \(f(\theta)\) is the reflectance of a material at \(\theta\). \(f(\theta)\) must be between 0 and 1, and can be interpreted as the probability that a photon with wavelength \(\theta\) is reflected. The functions \(w_1(\theta), w_2(\theta), w_3(\theta)\) are responsivities of the human eye for short, medium, and long wavelength bands. \(Z_w\) is the object color solid and a zonoid in \(\mathbb{R}^3\). In the colorimetry book [6], the theorem of Lyapunov and the “bang-bang principle” are mentioned in Chapter 7 Notes 4 and 5, page 321. The first bang is 0, and the second bang is 1.
In this section, we want to derive an expression similar to (\(\ref{eqn:defZ2}\)), but for \(\partial Z_w\) instead of \(Z_w\).
Let \(c = (c_1,...,c_m)\) be a fixed non-zero vector and consider maximizing the inner product of \(\langle c , z \rangle\) over all \(z \in Z_w\). By (\(\ref{eqn:defZ2}\)) any such \(z\) is \(\mu_w(V)\) for some \(V \subset \mathbb{S}^1\) and we have: \[\begin{equation} \left\langle c, \mu_w(V) \right\rangle ~=~ \left\langle c, \int_V w(\theta) \, d\theta \right\rangle ~=~ \int_V \left\langle c, w(\theta) \right\rangle \, d\theta ~=~ \int_V c_1 w_1(\theta) + ... + c_m w_m(\theta) \, d\theta \label{eq:maximized} \end{equation}\] This expression is clearly maximized when \(V\) is the set of \(\theta\) where the combination \(c_1 w_1(\theta) + ... + c_m w_m(\theta)\) is non-negative. Denote this set by: \[\begin{equation}\label{eqn:Vc} V_c := \left\{ \theta ~|~ c_1 w_1(\theta) + ... + c_m w_m(\theta) \ge 0 \right\} \end{equation}\] Since the maximum of the inner product must be taken on \(\partial Z_w\), choosing this \(V_c\) means that \(\mu_w(V_c) \in \partial Z_w\). Note that \(V_c\) might be empty, and it might be the entire circle.
Now define \[\begin{equation} \large\mathscr{V} \normalsize_w~:=~ \left\{ V_c ~|~ c \ne 0 \} ~=~ \{ V_c ~|~ c \in \mathbb{S}^{m-1} \right\} ~\subset~ \large\mathscr{V} \end{equation}\] \(\large\mathscr{V} \normalsize_w\) is a family of subsets of \(\mathbb{S}^1\) that depends only on \(w\). The set with \(\mathbb{S}^{m-1}\) is valid because multiplying \(c\) by a positive scalar does not change \(V_c\). \(\large\mathscr{V} \normalsize_w\) inherits a topology as a subspace of \(\large\mathscr{V}\); see the previous section. Now let \(H_w\) be the restriction of \(\mu_w\) in equation \(\eqref{eq:VtoZ_w}\) of the previous section to \(\large\mathscr{V} \normalsize_w\). As we have seen, the range of \(H_w\) is \(\partial Z_w\) and we have a continuous map \[\begin{equation} \large\mathscr{V} \normalsize_w~~ \overset{H_w}{\longrightarrow} ~~ \partial Z_w \label{eq:Vw_to_BZw} \end{equation}\] where \(H_w(V_c) := \int_{V_c} w(\theta) \, d\theta\).
For a convex body \(K\), a point \(x \in \partial K\) is called an exposed point in the direction \(c\) iff there is a supporting plane \(P\) at \(x\) with outward normal \(c\) and with \(K \cap P = \{ x \}\); see [10], p. 18.
Theorem A: For \(z_0 \in \partial Z_w\) with supporting plane \(P\) with outward normal \(c = (c_1,...,c_m)\), these statements are equivalent:
and if the statements are true, then \(H_w( V_c ) = z_0\) and \(V_c\) is the unique point in \(H_w^{-1}( z_0 )\).
Proof sketch:
(b) \(\Rightarrow\) (a). It is fairly easy to show that (b) implies that equation \(\eqref{eq:maximized}\) has a unique maximum \(V_c\), and \(z_0 = H_w(V_c)\).
not (b) \(\Rightarrow\) not (a). This direction is harder. First reduce to a single coordinate function \(w_i(\theta)\) that is non-zero on a set of positive measure, but the linear combination is zero on that same set. The first property in \(\eqref{eq:assume2}\) is used here. Define the indefinite integral \(\Phi(x) := \int_0^x w_i(\theta) \, d\theta\). This function is absolutely continuous and non-constant, see [7], pp. 252-255. These facts can be used to explicity construct a subset \(V'\), with \(\mu_w(V') \ne \mu_w(V_c)\) in the i’th coordinate, but with \(\left\langle c, \mu_w(V') \right\rangle = \left\langle c, \mu_w(V_c) \right\rangle\). If we define \(z' := \mu_w(V')\) we can see that \(z_0\) is not exposed in the direction \(c\).
For the final part, suppose that \(V' \in \large\mathscr{V} \normalsize_w\) with \(V' \ne V_c\). This means that \(\mu( V' \triangle V_c) > 0\). From this it is straightforward to show that \(\left\langle c, \mu_w(V') \right\rangle < \left\langle c, \mu_w(V_c) \right\rangle\). Thus \(H_w(V') \ne z_0\) and \(V' \notin H_w^{-1}( z_0 )\). \(~~\square\)
From now on, assume that \(w\) has this simplifying property:
Definition. \(w(\theta)\) has Property S iff every non-trivial linear combination \(c_1 w_1(\theta) + ... + c_m w_m(\theta) \ne 0\) for almost all \(\theta\).
Think of this property as a very strong form of linear independence. To be linearly independent, every non-trivial linear combination is non-zero on a set of positive measure. To have Property S, every non-trivial linear combination is non-zero almost everywhere.
Theorem B: If \(w\) has Property S, then the map \[\begin{equation}\label \large\mathscr{V} \normalsize_w~~ \overset{H_w}{\longrightarrow} ~~ \partial Z_w \end{equation}\] is a homeomorphism.
Proof: We have already seen that \(H_w\) is continuous. Let \(z_0 \in \partial Z_w\). Since \(Z_w\) is convex, there is a supporting hyperplane of \(Z_w\) at \(z_0\) with a non-zero outward-pointing normal \(c\). By Property S, statement (b) in Theorem A is true, and thus \(H_w( V_c ) = z_0\) and \(V_c\) is unique. This shows that \(H_w\) is bijective. \(\square\)
It follows that with Property S, every \(z_0 \in Z_w\) is an exposed point, and therefore an extreme point, and therefore \(Z_w\) is strictly convex, see [10] p. 87.
Remark. Without Property S, the conclusion of the theorem is definitely false. For example, if the range of \(w\) is finite, i.e. if \(w\) is a simple function, then \(\large\mathscr{V} \normalsize_w\) is finite too. But \(\partial Z_w\) is obviously not. In this case the zonoid is a zonotope - a zonoid which is also a polytope. Many equivalent conditions for zonotopes are discussed by Bolker in Theorem 3.3 of [2]. The exposed points of \(Z_w\) are simply its vertices. We hope to discuss polar zonotopes in a future version of this package.
This theorem does not say that the direction \(c\) is unique for a given \(z_0\); later we will see that for the polar zonoid \(Z_n\), there are points \(z_0 \in \partial Z_n\) with multiple supporting planes, in directions \(c\) and \(c'\), with \(c \ne c'\) but \(V_c = V_{c'}\).
We summarize this section with an expression for \(\partial Z_w\). If \(w\) has Property S, then by Theorem B \[\begin{equation}\label{eqn:bZw} \partial Z_w = \left\{ \int_{V_c} w(\theta) \, d \theta ~|~ c \neq 0 \right\} ~=~ \left\{ \mu_w(V_c) ~|~ V_c \in \large\mathscr{V} \normalsize_w\right\} \end{equation}\] Compare this expression with the expression for \(Z_w\) in (\(\ref{eqn:defZ2}\)). For \(Z_w\), \(V\) varies over all measurable \(V \subset \mathbb{S}^1\), but for \(\partial Z_w\) only the sets \(V_c\) are used.
Given a specific generating function \(w\), the first step in describing \(\partial Z_w\) is to describe the family \(\large\mathscr{V} \normalsize_w\) of subsets of \(\mathbb{S}^1\). In the next section we do this for a particularly simple and special \(w\).
We are finally ready to define the polar zonoid. Fix \(n \ge 1\) and let \(w(\theta)\) be given by the \(m = 2n+1\) functions: \[\begin{equation}\label{eqn:w} w(\theta) := ( \cos \theta, \sin \theta, \cos 2\theta, \sin 2\theta, ..., \cos n\theta, \sin n\theta, 1) \end{equation}\] These \(m\) functions are a basis for the trigonometric polynomials of order \(n\). From now on in this vignette, \(w\) means this specific function.
We call the generated zonoid the polar zonoid of order \(n\) in \(\mathbb{R}^{2n+1}\) and denote it by \(Z_n\). To describe \(\partial Z_n\), by (\(\ref{eqn:Vc}\)) and (\(\ref{eqn:bZw}\)) we must describe the sets \[\begin{equation} V_{a,b} := \{ \theta ~|~ a_1\cos \theta + b_1 \sin \theta ~+ ... ~+ a_n \cos n\theta + b_n \sin n\theta + a_0 \ge 0 \} \end{equation}\] where not all \(a_i\) and \(b_i\) are 0. Note we have switched from \(c_i\) to \(a_i\) and \(b_i\) because this is the classical notation for trigonometric polynomials. We also put the constant term last instead of first, because we think of the last coordinate as “vertical” and the others as “horizontal”.
For later use, we state without proof that the product of two trigonometric polynomials of order \(n_1\) and \(n_2\) is a trigonometric polynomial of order \(n_1 + n_2\).
It is well-known that the trignometric polynomials have most \(2n\) roots, see Chapter X, Theorem 1.7 in [11]. Thus Property S is trivially true, and Theorem B applies. Since the trigonometric polynomials are continuous, we can conclude that each set \(V_{a,b}\) is the union of \(n\) or fewer arcs (possibly no arcs at all) in the circle, or the entire circle.
Conversely, given any \(n\) disjoint closed arcs, there is a trigonometric polynomial of order \(n\) whose roots are the \(2n\) endpoints of those arcs, and is non-negative on those arcs.
We conclude that for the above \(w\) of trigonometric functions: \[\begin{equation} \large\mathscr{V} \normalsize_w= \text{ the space of } n \text{ or fewer pairwise disjoint closed arcs in the circle } \mathbb{S}^1 \end{equation}\]
We investigate families of arcs in the next section.
Definition: \(A_n\) is the space of \(n\) or fewer pairwise disjoint closed arcs in the circle \(\mathbb{S}^1\).
\(A_n\) is the same as \(\large\mathscr{V} \normalsize_w\) in the previous section, and from now on we use this new notation.
For example, here are 2 plots of arcs on the circle, the left with 1 arc and the right with 3 arcs.
oldpar = par( mfrow=c(1,2) , omi=c(0.1,0.1,0.1,0.1), mai=c(0.45,0.5,0.1,0) )
arcmat = matrix( c(1.5,2.9), nrow=1, ncol=2, byrow=TRUE )
plotarcs( arcmat, main=NA )
arcmat = matrix( c(1.5,2, pi,0.5, 5,pi/4 ), nrow=3, ncol=2, byrow=TRUE )
plotarcs( arcmat, main=NA ) ; par( oldpar )Figure 3.0 examples of collections of pairwise disjoint arcs
Both of these represent points in \(A_3\). The left plot also represents a point in \(A_1\). We define \(A_0\) to be the set of 2 improper arcs: the empty arc, and the full circle.
We have proper inclusions: \[\begin{equation} A_0 \subset A_1 \subset A_2 \subset A_3 \subset A_4 ~~~ ... \end{equation}\]
We make \(A_n\) into a topological space by identifying a set of disjoint arcs \(V\) with its indicator function \(\mathbf{1}_{V} \subset L^1( \mathbb{S}^1 )\). We think of \(A_n\) as a subset of this \(L^1\) and let \(A_n\) inherit the topology from the bigger space. Equivalently, \(A_n\) is a metric space with metric defined as follows. Let \(V\) and \(W\) be sets of arcs in \(A_n\), so \(V , W \subseteq \mathbb{S}^1\). Define the metric \(d(V,W) := \int_{\mathbb{S}^1} \lvert \mathbf{1}_{V} - \mathbf{1}_{W} \rvert d\theta\).
The metric can be viewed in another way; the symmetric difference of
\(V\) and \(W\) is also a collection of arcs, and \(d(V,W)\) is the total length of the arcs in
this symmetric difference \(V \triangle
W\). The corresponding functions in the package are
arcsdistance() and arcssymmdiff(). With this
choice of metric, an arc of length 0 is considered to be the same as the
empty arc, but it is allowed in the software.
There is a useful relationship between the uniqueness of supporting hyperplanes and the number of arcs.
Theorem C: For \(V \in A_n\), \(V\) has exactly \(n\) arcs if and only if the supporting hyperplane of \(Z_n\) at \(\mu_w(V)\) is unique.
Proof: Suppose \(V \in A_n\) has exactly \(n\) arcs, i.e. that \(V \in A_n - A_{n-1}\). Let \(T(\theta)\) be the trigonometric polynomial of order \(n\) with roots at the \(2n\) endpoints, and orientation that matches \(V\). Then all the roots of \(T(\theta)\) of simple which means that \(T(\theta)\) is unique up to a positive multiple. The coefficients of \(T(\theta)\) are the normal to supporting hyperplane and this implies that the hyperplane is unique.
Suppose that \(V \in A_n\) has exactly \(n'\) arcs with \(n' < n\). The corresponding polynomial \(T(\theta)\) has order \(n'\) with \(2n'\) roots. Take a trignometric polynomial \(T_\delta(\theta)\) of order \(n - n'\) that is everywhere positive and not constant. This is easy - just take all \(a_i\) and \(b_i\) small and non-zero for \(i> 0\), and \(a_0\) sufficiently large. Then the product of \(T(\theta)\) and \(T_\delta(\theta)\) is order \(n\) and has exactly the same arcs. The coefficients of the product are a normal vector in a different direction and thus there is another supporting hyperplane. \(\square\).
The theorem says that if a point \(z_0 \in \partial Z_n\) is the image of a point in \(A_n - A_{n-1}\), then \(\partial Z_n\) is smooth at \(z_0\). In the terminology of convex bodies, \(z_0\) is a regular point; see [10] p. 83. But if \(z_0\) is the image of a point in \(A_{n-1}\), then \(z_0\) is a singular point and \(\partial Z_n\) has a “crease” at \(z_0\).
For example, when \(n=1\), \(\partial Z_1\) is homeomorphic to \(\mathbb{S}^2\) and it has cusps at 2 singular “poles” corresponding to the 2 points in \(A_0\). An approximation of it is illustrated in this figure:
plot( zonohedra::polarzonohedron( 25, height=2*pi ), type='f', falpha=1 )
rgl::arc3d( 1.005*c(2,0,pi), 1.005*c(0,2,pi), center=c(0,0,pi), base=c(0,1), color='red', lwd=3 )
rgl::rglwidget( webgl=TRUE )polar zonohedron with 25 generators [this is an interactive WebGL widget, try it !]
polar zonohedron with 25 generators    [this is an interactive WebGL widget, try it !]
From Theorem B there is a homeomorphism \(A_n \to \partial Z_n\). For \(n{=}1\), the description of it is fairly easy. For \(n{=}1\) there is a single arc in the circle. The center of the arc maps to the “longitude” of the boundary \(\partial Z_1\), and the length of the arc maps to the “latitude”. Length=0 (the empty arc) goes to the black cusp \((0,0,0)\) at the “south pole” and Length=\(2\pi\) (the full circle) goes to the white cusp \((0,0,2\pi)\) at the “north pole”. Semicircles, where Length=\(\pi\), go to the red “equator”. This is a plot of a polar zonohedron, with \(M=25\) generators, that approximates the true polar zonoid. As \(M \to \infty\), the polar zonohedron converges to the polar zonoid, in the Hausdorff metric. This is shown at the end of [4]. The surface is the surface of revolution of the curve \(2\sin(z/2)\).
Remark. These investigations were largely inspired by a colorimetry paper by P. Centore [3], which started me thinking about the space \(A_2\).
From Theorem B we have a homemomorphism: \[\begin{equation} A_n \to \partial Z_n \end{equation}\] given by \(V \mapsto \int_V w(\theta) \, d\theta\) and \(w(\theta)\) is given by (\(\ref{eqn:w}\)). The goal of this section is to compute simple expressions for this mapping.
Let all arcs be oriented in the counter-clockwise direction. Take a
single arc starting at \(\theta_0\) and
with length \(L\), and denote it by
\([\theta_0,\theta_0+L]\). For
simplicity, compute the map for only 3 coordinate functions of \(w(\theta)\): \(\left( \cos k\theta, \sin k\theta, 1
\right)\). \[\begin{align*}
[\theta_0,\theta_0{+}L] &\mapsto \left( \int_{\theta_0}^{\theta_0+L}
\cos k\theta \, d\theta , \int_{\theta_0}^{\theta_0{+}L} \sin k\theta \,
d\theta , \int_{\theta_0}^{\theta_0+L} 1 \, d\theta \right) \\
&\mapsto \left( (\sin( k(\theta_0{+}L) ) - \sin(k\theta_0) )/k )
, (-\cos( k(\theta_0{+}L) ) + \cos(k\theta_0) )/k ) , L \right)
\end{align*}\] Expressions like these are used in the function
boundaryfromarcs().
It is far simpler to change the first 2 coordinates to complex numbers: \[\begin{align*} [\theta_0,\theta_0{+}L] &\mapsto \left( \int_{\theta_0}^{\theta_0+L} e^{ik\theta} \, d\theta , \int_{\theta_0}^{\theta_0+L} 1 \, d\theta \right) \\ &\mapsto \left( (e^{ik(\theta_0{+}L)} - e^{ik\theta_0} ) / (ik) , L \right) \end{align*}\] We leave it to the reader to check that the real and complex expressions are equivalent.
Now take the complex number representation a little further. Let the same arc start at \(u\) and go counterclockwise to \(v\) with length \(L\), where \(u\) and \(v\) are complex points on the unit circle. So that \(u = e^{i\theta_0}\) and \(v = e^{i(\theta_0{+}L)} = e^{i\theta_0} e^{iL}\). Now denote the same arc by \([u,v]\). Making these substitutions gives: \[\begin{equation} [u,v] \mapsto \left( \frac{v^k - u^k}{ik} , L \right) \end{equation}\] If we have a disjoint union of 2 arcs \(V = [u_1,v_1] \sqcup [u_2,v_2]\) with lengths \(l_1\) and \(l_2\), then we take the sum. \[\begin{equation} [u_1,v_1] \sqcup [u_2,v_2] \mapsto \left( \frac{(v_1^k - u_1^k) + (v_2^k - u_2^k)}{ik} , l_1 + l_2 \right) \end{equation}\]
If we denote the other coordinates on the right side by \(z_k\) as in: \[\begin{equation}
[u_1,v_1] \sqcup [u_2,v_2] \mapsto \left( z_1, ..., z_n , l_1 + l_2
\right)
\end{equation}\] then we identify points on the right side with
points in \(\mathbb{R}^{2n+1}\), and we
have: \[\begin{equation}
z_k = \frac{(v_1^k - u_1^k) + (v_2^k - u_2^k)}{ik} \hspace{20pt} k =
1,...,n
\end{equation}\] The generalization to more than 2 disjoint arcs
is straightforward. These equations are used extensively in the
functions boundaryfromsphere() and
arcsfromboundary(), see the Implicitization vignette.
\(Z_n\) is a convex body so it is
homeomorphic to the ball \(B^{2n+1}\),
and its boundary is homeomorphic to \(\mathbb{S}^{2n}\). An explict map is
trivial to construct. The center of \(Z_n\) is \(c =
(0,...0,\pi)\) in the interior of \(Z_n\). For \(b
\in \partial Z_n\) use the projection onto the unit sphere
centered at \(c\): \(b \mapsto (b - c)/||b -c||
\in\mathbb{S}^{2n}\). This is computed in the function
spherefromboundary().
The inverse \(\mathbb{S}^{2n} \to \partial
Z_n\) is much harder since now we are given a ray based at \(c\) and must compute where that ray
intersects \(\partial Z_n\). This is
computed iteratively in boundaryfromsphere() and depends on
an implicit function for \(\partial
Z_n\), for details see the Implicitization vignette. This function
is only implemented for \(n\) = 1, 2,
and 3.
The space of arcs \(A_n\) has a natural involution \(\gamma\), which is the complementation operation, given by \(\gamma(V) = \operatorname{Cl}(\mathbb{S}^1 - V)\). The closure \(\operatorname{Cl}\) is only necessary to create closed arcs. Note that if \(V\) has \(k\) disjoint closed arcs, then so does \(\gamma(V)\). This involution is conjugate to the antipodal map on \(\mathbb{S}^{2n}\) under the composition \(A_n \to \partial Z_n \to \mathbb{S}^{2n}\). These properties are discussed further in the Real Projective Spaces and 3x3 Rotation Matrices vignette.
Logging is performed using the package logger, see
[5]. This is a powerful package that
allows a separate configuration for logging from within
polarzonoid, and that is what I have done. During
package loading, the logging threshold is changed from INFO
to WARN. To change it back again, one can execute:
log_threshold( INFO, namespace="polarzonoid" )
The layout callback functions is customized; it adds the name of the
calling function to the message. To install your own layout function,
you can execute:
log_layout( <your function>, namespace="polarzonoid" )
The appender callback functions is also customized; it comes to an
immediate stop if the message level is ERROR or
FATAL. To return to the default behavior, you can
execute:
log_appender( appender_console, namespace="polarzonoid" )
The formatter callback function is forced to be
formatter_sprintf(); this should not be changed.
R version 4.6.1 (2026-06-24 ucrt) Platform: x86_64-w64-mingw32/x64 Running under: Windows 11 x64 (build 26200) Matrix products: default LAPACK version 3.12.1 locale: [1] LC_COLLATE=C [2] LC_CTYPE=English_United States.utf8 [3] LC_MONETARY=English_United States.utf8 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.utf8 time zone: America/Los_Angeles tzcode source: internal attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] zonohedra_0.7-0 rgl_1.3.36 flextable_0.9.12 polarzonoid_0.4-0 loaded via a namespace (and not attached): [1] sass_0.4.10 generics_0.1.4 tidyr_1.3.2 [4] fontLiberation_0.1.0 xml2_1.6.0 digest_0.6.39 [7] magrittr_2.0.5 evaluate_1.0.5 grid_4.6.1 [10] RColorBrewer_1.1-3 fastmap_1.2.0 jsonlite_2.0.0 [13] zip_3.0.0 purrr_1.2.2 scales_1.4.0 [16] fontBitstreamVera_0.1.1 microbenchmark_1.5.0 textshaping_1.0.5 [19] jquerylib_0.1.4 cli_3.6.6 rlang_1.2.0 [22] fontquiver_0.2.1 base64enc_0.1-6 xslt_1.5.1 [25] cachem_1.1.0 yaml_2.3.12 gdtools_0.5.1 [28] av_0.9.6 tools_4.6.1 officer_0.7.5 [31] uuid_1.2-2 dplyr_1.2.1 ggplot2_4.0.3 [34] equatags_0.2.2 katex_1.5.0 curl_7.1.0 [37] vctrs_0.7.3 logger_0.4.2 R6_2.6.1 [40] lifecycle_1.0.5 htmlwidgets_1.6.4 V8_8.2.0 [43] ragg_1.5.2 pkgconfig_2.0.3 pillar_1.11.1 [46] bslib_0.11.0 gtable_0.3.6 data.table_1.18.4 [49] glue_1.8.1 Rcpp_1.1.1-1.1 systemfonts_1.3.2 [52] xfun_0.59 tibble_3.3.1 tidyselect_1.2.1 [55] knitr_1.51 farver_2.1.2 htmltools_0.5.9 [58] rmarkdown_2.31 compiler_4.6.1 S7_0.2.2 [61] askpass_1.2.1 openssl_2.4.2