The 2-Transition Subcomplex and the 2-Transition Surface

Throughout this vignette, Z is a zonohedron such that none of its generators L(e1), ..., L(en) are 0, and no generator is a multiple of another. Equivalently, we assume that matroid of Z is simple. For more discussion of zonohedra, see the Zonotopes vignette.

Given such a zonohedron Z, and a cyclic ordering of the generators of Z, there is a surface contained in Z, which may coincide with Z, but in general does not. In this vignette we give a careful definition of this 2-transition surface, give some examples, and explain some of the relevant functions in the zonohedra package for processing this surface. Points in the 2-transition surface are analogous to the reflectance spectra of Schrödinger colors. Points in Z are analogous to the reflectance spectra of optimal colors, see [8], [5], and especially [10].

Featured functions in this vignette are: raytrace2trans(), transitionsdf(), and plothighertrans().

Given x1, x2 ∈ ℝn, [x1, x2] denotes the line segment from x1 to x2.


library(zonohedra)



The Unit Cube Qn

We abbreviate Qn := [0, 1]n, i.e. the n-cube. So Qn is all points x = (α1, ..., αn) where all αi ∈ [0, 1]. For this vignette we assume n ≥ 3.

A vertex of Qn is a point where all αi = 0 or 1; there are 2n vertices. If two vertices differ by exactly one coordinate, they are the endpoints of an edge, and the “free” coordinate parameterizes the edge. There are n2n − 1 edges. If four vertices differ by two coordinates, they are the vertices of a square, and the two “free” coordinates parameterize the square. There are $\binom{n}{2} 2^{n-2}$ squares. In the familiar case when n = 3, there are 8 vertices, 12 edges, and 6 squares. Note that (α1, ..., αn) ∈ ∂Qn iff some αi= 0 or 1. Thus vertices, edges, and squares are all subsets of Qn.

The standard involution ρ : Qn → Qn is the map (α1, ..., αn) ↦ (1 − α1, ..., 1 − αn). It is clear that ρ maps a vertex to an antipodal vertex, Similarly, there are pairs of antipodal edges and antipodal squares. ρ has a unique fixed point (1/2, ..., 1/2), which is the center of symmetry.



The 2-Transition Subcomplex Q2n ⊊ Qn

This section treats the 2-transition subcomplex of Qn with n ≥ 3, which we denote by Q2n. We define it in three ways.

Definition 1:
Visualize the indexes 1, ..., n as points on the circle, like beads in a necklace, or the n roots of unity. Different points i ≠ j divide the other points into 2 contiguous “arcs” (one of them may be empty). Define (α1, ..., αn) ∈ Q2n iff there are i ≠ j, so that αk = 0 for k in one arc and αk = 1 for k in the other arc.

There are 2 ways to choose 0 and 1, so as αi and αj vary, they “sweep out” 2 disjoint and antipodal squares in Qn. The total number of these 2-transition squares is n(n − 1). Q2n is the union of these squares, joined along their edges.

It is helpful to visualize points in the unit cube as bar graphs. Here are four points in Q210, with 2 transitions:

mybarplot <- function( x )  {
n = length(x)
plot( c(0,n), c(0,1), type='n', tcl=0, las=1, xaxt='n', xlab='', ylab='', mgp=c(3,0.25,0) )
grid( nx=NA, ny=NULL, lty=1 )
barplot( x, names.arg=1:n, space=0, add=T, yaxt='n', mgp=c(3,0.25,0) )
}

x1 = numeric(10) ; x1[ c(3,8) ] = exp( c(-0.25,-1) ) ; x1[ 4:7 ] = 1
x2 = numeric(10) ; x2[ c(5,6) ] = exp( c(-1,-0.25) )

oldpar = par( mfrow=c(2,2)  , omi=c(0,0,0,0), mai=c(0.45,0.5,0.1,0) )
mybarplot( x1 )   ; mybarplot( x2 )     #  row #1
mybarplot( 1-x1 ) ; mybarplot( 1-x2 )   #  row #2
Figure 2.1  four points in the 2-transition complex, visualized with bar graphs

Figure 2.1 four points in the 2-transition complex, visualized with bar graphs

par( oldpar )

For the first point, the run of 1s has length 4, and the (circular) run of 0s also has length 4. For the next plot, the run of 1s has length 0, and the (circular) run of 1s has length 8. The points in row #2 are derived by applying the involution to the point above it. Of course, the involution turns runs of 1s to runs of 0s, and vice-versa.

The special vertices (0, ..., 0) and (1, ..., 1) are in Q2n by this definition, although they technically have no transitions. Also, if αi = 0 except for one i, that point is also in Q2n because it is in an edge of one of the above-defined squares.

Note that Q23 = ∂Q3, i.e. every point in the boundary of Q3 is a 2-transition point.


Definition 2:
This definition views a 2-transition point as a special discrete projection of a 2-transition function defined on a circle.

Given n, define n + 1 points, βi := i + 1/2 for i = 0, ..., n, and n intervals Ii := [βi − 1, βi] = [i − 1/2, i + 1/2] for i = 1, ..., n. These intervals have length 1 and are a partition of [1/2, n + 1/2].

Let J2 be the set of all (step) functions on [β0, βn] that take the values 0 or 1 and have two transitions or no transitions (jumps). We identify the endpoints β0 and βn to form a circle, so if the functions values at β0 and βn are different, then this is considered to be a transition. Equivalently J2 is the set of all indicator functions 1A where A is an arc in the circle. We allow the arc to be empty (the function is identically 0), or the entire circle (the function is identically 1). Define a function p() Note that αi is the mean of f on Ii. So if f is identically 1 on Ii, then αi = 1 in p(f). And the same is true with 1 replaced by 0. But if f has a jump in Ii, then αi can be anywhere in [0, 1] depending on where the jump occurs. If there is exactly one jump in Ii, then the location of the jump is uniquely determined by αi. But if there are two jumps in Ii, then the 2 jump locations are not determined by αi. It only determines the distance between the jumps, so both can be translated a little bit and not change αi. Thus, p is not injective.

Here are plots with 2 examples:

mystepplot <- function( x )  {
# assumption: x is Type I
n = length(x)
plot( c(1/2,n+1/2), c(0,1), type='n', tcl=0, las=1, xlab='', ylab='', lab=c(n,5,7), mgp=c(3,0.25,0) )
grid( lty=1 )
beta = seq(1/2,n+1/2,by=1) ; segments( beta, 0, beta, -0.02 )
ij = which( 0<x & x<1)  ;  lambda = ij + c(1/2 - x[ ij[1] ], x[ ij[2] ] - 1/2)
lines( c(0.5,lambda[1]), c(0,0) ) ; lines(lambda,c(1,1)) ; lines( c(lambda[2],n+1/2), c(0,0) )
segments( lambda, c(0,0), lambda, c(1,1), lty=3 )
}

oldpar = par( mfrow=c(2,2), omi=c(0,0,0,0), mai=c(0.45,0.5,0.1,0) )
mystepplot( x1 ) ; mystepplot( x2 )     #  row #1
mybarplot( x1 ) ; mybarplot( x2 )       #  row #2
Figure 2.2

Figure 2.2

par( oldpar )

The 1st plot shows a function f ∈ J2 with jumps in intervals I3 and I8. The plot below it shows p(f) ∈ Q210. The 2nd plot shows a function f ∈ J2 with jumps in intervals I5 and I6. The plot below it shows p(f) ∈ Q210. In the 1st row, the sequence βi (all of them half-integers) is marked with small tick marks.

We now define Q2n to be the image of p(); i.e. Q2n := p(J2). It is straightforward to show that Definition 2 and Definition 1 are equivalent.

Now we look at J2 in more detail. Every function in J2 is integrable, so we can think of J2 ⊊ L1(𝕊1), which is the space of integrable functions on the circle 𝕊1.

Theorem With the L1 topology, J2 is homeomorphic to the 2-sphere 𝕊2.

Proof Denote the 2 functions in J2 that are identically 0 or 1 by f0 and f1. For a point in J2 − {f0, f1}, the corresponding arc A is non-trivial, and so the midpoint of the arc is a well-defined point in 𝕊1. The length of the arc is in the open interval (0, 2π). This assignment gives a homeomorphism from J2 − {f0, f1} to the open cylinder U := 𝕊1 × (0, 2π). Note that as two points in J2 get closer to f0, they get closer to each other in the L1 metric; and similarly for f1. So if bottom and top boundaries of U are each collapsed to a point, and f0 and f1 are mapped to those two points, it continuously extends the above homeomorphism to all of J2 and to the cylinder with collapsed boundaries, which is just a 2-sphere 𝕊2.

Later, we will see that Q2n is also homeomorphic to 𝕊2. But the above mapping p : J2 ↠ Q2n is not a homeomorphism, because we observed above that p is not injective.


Definition 3:
This definition works directly with vertices and squares of Qn. A 2-transition vertex is one with a single circular run of 0s, and a single circular run of 1s. A run is allowed to empty, and this yields the vertex of all 0s and all 1s. A 2-transition square is a square whose 4 vertices are all 2-transition vertices. Note that the center of the square has exactly 2 coordinates with value 1/2, and the other values are a circular arc of 0s and an arc of 1s. We now define Q2n to be the union of all these 2-transition squares. It is an example of a cubical subcomplex of Qn. Once again, it is straightforward to show that Definition 3 and Definition 1 are equivalent.

For an x := (α1, ..., αn) ∈ Q2n, we define the level of x be the number of αi’s that equal 1. The level varies from 0 to n. The level is constant on the interior of an edge and the interior of a square. We define the level of a square to be the level on the interior. The level of a square varies from 0 to n − 2. It is helpful to think of level=0 squares at the “bottom” of the subcomplex, and level=n − 2 squares at the “top”.

So we know that Q2n is a union of squares, but what does it “look like”, and what is its topology? We claim that Q2n is a 2-sphere 𝕊2. In the case of n = 3 this is easy to see, since Q23 = Q3.

In general, first consider all the 2-transition squares with level=0. It is straighforward to show that such a square has 0 as a vertex, and it has 2 vertices with level=1 and one vertex with level=2. Each edge from 0 to a level 1 vertex is shared by two of the squares, and so the squares are arranged in circular fashion around 0. Their union is a topological disk 𝔻2 at the “bottom”. Similarly, the level=n − 2 squares form a disk at the “top”.

Now consider squares with fixed level 𝓁 with 0 < 𝓁 < n − 2. It is easy to show that in each square, both of the level=𝓁 + 1 vertices are in one other square, so the level 𝓁 squares form a “necklace of n diamonds”. These n − 3 necklaces are stacked on top of each other to form a cylinder, and the cylinder is capped at bottom and top to form the 2-sphere 𝕊2. We now verify the square count in Q2n; n + n(n − 3) + n = n(n − 1) which is correct.

The following figure is a helpful visualization.

rgl::par3d( zoom=0.7 )
rgl::mfrow3d( 1, 2 )
zono =  polarzonohedron(9)
plot2trans( zono )
rgl::next3d()
plot2trans( zono, level=c(0,4,7) )
rgl::rglwidget( webgl=TRUE )

Figure 2.3     [these are interactive WebGL widgets]

This figure plots the image of Q29 in 3 under a suitable linear map. The squares are distorted into parallelograms. The figure on the left draws the full subcomplex, and the one on the right only draws levels 0, 4, and 7. The “necklace of 9 diamonds” at level=4 is easily visible. The black dot is the image of (0, ..., 0), and the white dot is the image of (1, ..., 1).

More about these linear maps is given in the next section.



The 2-Transition Surface S2 ⊊ Z ⊊ ℝ3

Let the zonohedron Z := L(Qn), where L : ℝn ↠ ℝ3 is a surjective linear map. From now on we assume that Z is pointed, which means that 0 is a vertex of Z.

Let S2 := L(Q2n) be the image of the 2-transition subcomplex Q2n. Since the subcomplex is a union of squares glued on the edges to form a 2-sphere 𝕊2, S2 is a union of parallelograms glued on the edges. S2 is a tesselated surface, but may not be a sphere because it may have self-intersections.

We are mainly interested in the case that there are no self-intersections, and there is a precise way to state this. Let L2 be the restriction of L to Q2n. So L2 : Q2n → ℝ3 is the composition of the inclusion Q2n ⊊ ℝn followed by L. The surface has no self-intersections iff L2 is injective.

For example, in the previous figure S2 does not have self-intersections and is a topological 2-sphere. L2 is injective.

If L2 is injective, then it is well-known ([1], [7] p. 117, and [2] p. 161) that S2 divides 3 into an inside region and an outside region whose intersection is S2. Moreover, the inside region is homeomorphic to a closed ball, and S2 is the boundary of that ball.

Since Q2n ⊊ Qn, S2 = L(Q2n) ⊊ L(Qn) = Z. We emphasize that S2 is a surface, and Z is a solid. We also emphasize that S2 depends intimately on the order of the generators, and Z does not depend on the order at all.



Polygons

A polygon for us is more than just a subset of the plane. A polygon is a finite and cyclically ordered set of distinct vertices, plus the line segments that connect the vertices in cyclic order. The line segments are called the edges. The union of the edges is a subset of the plane, but two different sets of vertices can generate the same subset - the vertices matter.

A simple polygon is a polygon whose edges do not intersect, except at corresponding endpoints; i.e. the polygon has no self-intersections. By the Jordan Curve Theorem, a simple polygon, as just a set, has an inside region and an outside region, and both are connected. Note that a non-simple polygon may also have a connected inside region; it might “double-back” on itself within an edge, and then proceed forward again.

A convex polygon is a polygon with an inside region that is convex.

There is an equivalent definition of polygon using functions. Let Un be the set of n’th root of unity on the unit circle in , plus the edges connecting these vertices in order. So Un is sort of a quintessential or template polygon. A general polygon is a function f : Un → ℝ2 which is injective on the vertices (the image vertices are distinct) and linear on each edge. Since f is injective on the vertices, it is also injective on each edge; one can think of f as a piecewise-linear immersion of Un. A polygon defined this way is simple iff f is injective.

This is an unintuitive way to define a polygon, but has the advantage that it generalizes easily to one higher dimension, as we see later in Section 9.



The Generator Polygon P

Since Z is pointed, there is a plane K in 3 that has 0 in one open halfspace, and all the generators of Z in the other open halfspace. This “cutting” hyperplane intersects S2 in a polygon. Each vertex of the polygon is the intersection of K and the segment from 0 to a generator. The cyclic order of its vertices is inherited from the order of the generators. We call this the generator polygon and let P := K ∩ S2 denote it.

P may not be a simple polygon in general; it may have self-intersections.

Since there can be many cutting hyperplanes K, P is only defined up to a projective transformation. In colorimetry for example, there are three chromaticity diagrams, from 1931, 1960, and 1976. They are all generator polygons for the same set of generators, and the 3 polygons differ by projective transformations, see [4].



Parallelograms in S2 and Z

Given Z and S2 as above, the goal in this section is to show that each is a union of n(n − 1) parallelograms, and to set up a 1-1 correspondence between the parallelograms in S2 and those in Z. Each parallelogram will also be assigned a unit normal in such a way that corresponding parallelograms have the same normal.

First consider Z. If a facet of Z is not a parallelogram, let it be tiled with the standard tiling by parallelograms, see the Zonotopes vignette. Given an unordered pair {i, j} with 1 ≤ i, j ≤ n and i ≠ j, there are 2 antipodal parallelograms in Z. The edges of both parallelograms are the generators L(ei) and L(ej). If 𝒫 is one of those parallelograms, we know that 𝒫 is the image of some square in Qn. The following Lemma algebraically characterizes which squares map to a parallelogram 𝒫 ⊂ ∂Z.

Lemma: Let Σ be a square in Qn. By definition Σ is determined by an unordered pair {i, j} and for all k ∉ {i, j}, an assignment of αk to either 0 or 1. The coordinates αi and αj are ‘free’ in [0,1] and sweep out the square. Let the parallelogram 𝒫 := L(Σ) ⊊ Z be the image of the square. Let w := L(ei) × L(ej) be the cross product of the edges of 𝒫. Then 𝒫 ⊂ ∂Z iff for all k ∉ {i, j}

Note that the two conditions are almost the same; the first 2 cases merely swap 0 and 1, and the third case is the same in both conditions. The third case is not really new; it comes from the definition of the square. Also note that the order of i and j affects the definition of w, but if i and j are swapped, w is changed to w which merely swaps the two conditions.

Proof: Let λ be the linear functional z ↦ ⟨z, w. Since L(ei), w⟩ = ⟨L(ej), w⟩ = 0, the values of αi and αj have no effect on λ(L(x)). Similarly, in the last case where L(ek), w⟩ = 0, αk has no effect. This case only happens when L(ek) is a linear combination of L(ei) and L(ej), and the corresponding facet is non-trivial with 6 or more edges. The facet then requires a selected tiling, and different tilings yield different assignments of 0 and 1 to αk.

If the square Σ satisfies the first condition above, then any x ∈ Σ maximizes λ(L(x)) over all x ∈ Qn. Therefore L(Σ) ⊂ ∂Z, by the definition of Z. If the square Σ satisfies the second condition, then λ(L(x)) is minimized and the conclusion is the same.

Conversely, if the square satisfies neither condition, then λ(L(x)) for x ∈ Σ is strictly between the maximum and the minimum. This means that L(Σ) is in an intermediate hyperplane orthogonal to w. The intersection of an intermediate hyperplane with Z is only a 1-dimensional polygon and cannot contain a parallelogram. Thus L(Σ) ⊄ ∂Z.

Define a slab in 3 to be the region between two parallel planes, including the planes themselves. In equation form, a slab 𝒮 is given by where w ∈ ℝ3 is the non-zero plane normal, and x, w⟩ = α and x, w⟩ = β are the two planes. If α < β then each point in the boundary planes of 𝒮 has a unique outward-pointing unit normal. But if α = β then the planes coincide, the slab degenerates to that plane, and a normal cannot be assigned unambiguously.

Given an unordered pair {i, j} with 1 ≤ i, j ≤ n and i ≠ j, there are 2 antipodal parallelograms in Z. The edges of both parallelograms are the generators L(ei) and L(ej). They define two distinct parallel planes and therefore a non-degenerate slab denoted by 𝒮{i, j}. The slab has 2 well defined boundary normals, which we assign to the 2 parallelograms in the boundary of the slab. Note that if u is the unit normal for one of the parallelograms 𝒫, then u is a multiple of the cross product L(ei) × L(ej).

Now consider S2. Given an unordered pair {i, j} as above, there are 2 antipodal parallelograms in S2 and the edges of both are the generators L(ei) and L(ej). These 2 parallelograms are parallel to each other; let 𝒮2{i, j} be the slab defined by them. The 2 parallelograms in Z given by {i, j} have the same edges - the generators L(ei) and L(ej). So it is clear that 𝒮2{i, j} ⊆ 𝒮{i, j}. If this new slab is non-degenerate, then each of the two parallelograms in S2 can be matched to exactly one of the two parallelogram in Z by choosing the one with the same normal vector. If this new slab is degenerate, its outward-pointing normal is not defined, and we can pick an assignment at random.

This completes the goal of this section.

An interesting observation: since corresponding parallelograms are congruent, they have the same surface area, and therefore S2 and Z have the same surface area as well.



A Theorem about S2 and the Convexity of P

We have seen that S2 ⊊ Z. It is natural to ask:

When is S2 as large as possible, namely the entire boundary of Z ?

Recall our assumptions that Z has a simple matroid, and is pointed.

Theorem: With Z, S2, L2, and P defined as above, the following are equivalent:
  1. S2 = ∂Z
  2. L2 is injective, and the inside region of S2 is convex
  3. P is a simple convex polygon, possibly with collinear vertices

The equivalence of properties 1 and 3 is proved in West & Brill [10], except the sequence of vector generators in this theorem is replaced by a continuous path of vectors in [10]. To our knowledge, property 2 is new.

Proof:
1. ⟹ 2. L2 is clearly injective on each square. If a parallelogram of S2 is in Z then it must be the corresponding parallelogram (or its antipodal) in Z from the previous section. This mapping of parallelograms is 1-1, and since the parallelograms of Z are disjoint (except on the edges) the parallelograms of S2 are disjoint (except on the edges). Therefore L2 is injective.

The inside region of S2 is the inside region of Z, which is Z, which is convex.

2. ⟹ 3. (trivial) The polygon P is the intersection of a hyperplane and the boundary of a convex polyhedron, and that intersection is a convex polygon. Since L2 is injective, P is simple.

3. ⟹ 1. For a generator L(ei), let vi be the corresponding vertex of P. It is the intersection of the ray generated by L(ei) and the cutting hyperplane K. Note that vi is a positive multiple of L(ei).

Firstly we show that S2 ⊆ ∂Z.

Let {i, j} be an unordered pair of indexes as above. These indexes divide the remaining indexes into 2 contiguous circular sequences. Let 𝒫 be one of the corresponding parallelograms of S2, and let u be its unit normal. By definition, 𝒫 is the image under L of a 2-transition square Σ in Q2n. For Σ, all αk in one sequence are 0, and all αk in the other sequence are 1.

We want to show that 𝒫 is also in Z. Let be the line through vi and vj. The plane given by x, u⟩ = 0 contains both L(ei) and L(ej), and so vi, u⟩ = ⟨vj, u⟩ = 0. The line divides K into a positive side and a negative side. For another vertex vk, L(ek), u⟩ > 0 iff vk is on the positive side of , and L(ek), u⟩ < 0 iff vk is on the negative side of .

Consider the relationship between and P.

Case i). intersects the interior of P
Since P is convex, all the vk in one contiguous sequence are on the positive side of and all the vk in the other contiguous sequence are on the negative side of . This implies that all the generators L(ek) in one contiguous sequence, have L(ek), u⟩ > 0, and all the generators L(ek) in the other contiguous sequence have L(ek), u⟩ < 0. But we saw earlier that the αk in one sequence are all 0, and the αk in the other sequence are all 1. This is exactly the condition given by the Lemma in the previous section. Therefore 𝒫 ⊆ ∂Z.

Case ii). intersects P, but not the interior of P
This case is a little more subtle, but basically the same. Since P is convex, w.l.o.g. we can assume all vk are either on or on the negative side of . Those on the negative side are part of contiguous sequence, so for all these k, αk is either 0 or 1. For the vk that are on the line, L(ek), u⟩ = 0, so the conditions in the above Lemma do not care whether αk is 0 or 1. Thus all αk satisfy the conditions of the Lemma and so 𝒫 ⊂ ∂Z.

Secondly we show that Z ⊆ S2.

Let 𝒫 ⊂ ∂Z and let Σ be the square whose image is 𝒫. We want to show that every x ∈ Σ has 2-transitions.

Case i). intersects the interior of P
Then for k ∉ {i, j}, all the generators L(ek) in one contiguous sequence have L(ek), u⟩ > 0, and all the generators L(ek) in the other contiguous sequence have L(ek), u⟩ < 0. In no case is L(ek), u⟩ = 0. The Lemma then forces two possibilities for αk, and both of them have 2 transitions.

Case ii). intersects P, but not the interior of P
We know vi and vj are on the line . Let ℐ := { l : vl ∈ ℒ }. Since P is simple, the set of vl for l ∈ ℐ is contiguous in P.

If i and j are the only indexes in , then since P is simple and convex, all the other vk are contiguous and on one side of . So by the Lemma, for all the other vk either αk = 0 or αk = 1. Therefore every x ∈ Σ has 2 transitions.

If has more than i and j then the generators L(el) for l ∈ ℐ generate a non-trivial zonogon facet of Z. Recall that this facet is tiled with the standard tiling. Since Z is pointed, the zonogon facet is also pointed. And since P is simple, the generators of the facet are in angular order. By the property of the standard tiling in the Zonotopes vignette, we know that there are 2 transitions in the sequence of αl for l ∈ ℐ. Assume now that all vertices of the complementary sequence are on the negative side of , so all the complementary αk = 0. When combined with the αl, the result is a 2-transition sequence, for every x ∈ Σ. If all vertices of the complementary sequence are on the positive side of , then we can use the central symmetry of Z to show that the sequence for x is the reflection, and thus still has 2 transitions.



Strictly Starshaped Surfaces

raytrace2trans() is one of the important functions in the package zonohedra. It expects that the 2-transition surface is nice enough so that a given ray intersects the surface in a unique point. This section explores the mathematics of this situation. It is convenient to deal with abstract polyhedral surfaces in 3.

Let S be a polyhedral 2-sphere, i.e. a sphere 𝕊2 that is tesselated by polygons, and let f : S → ℝ3 be a continuous map that is injective and linear on each polygon. One can think of f as a piecewise-linear immersion. It may not be injective on all S, so the surface f(S) may have self-intersections. f(S) is a polyhedral surface in 3. We call the surface polygons of f(S) facets. Since S is orientable, we can choose a normal vector ni for each facet, so that these normals are consistent across the edges. A facet and its normal defines a positive halfspace for the facet, and a negative halfspace for the facet.

The example we have in mind is the 2-transition surface S2 associated with a zonohedron.

Given the vectors ni and a point p ∉ f(S) the linking number of p and f(S) is defined as follows. Choose a ray based at p and not intersecting any edge of f(S); this is always possible. Now examine every intersection of the ray with the interior of a facet. If the ray crosses with the same orientation as ni, assign a +1; otherwise assign a -1. The linking number is defined to be the sum of all these +1s and -1s. It is independent of the chosen ray. Reversing the sign of every ni yields a consistent vector field and changes the sign of the linking number. The linking number is a straightforward generalization of the winding number of a closed polygonal curve in the plane and a point not on the curve. The linking number is the degree of a certain projection map (sometimes called the Gauss map or linking map) that depends on p and f(S). For more on this subject, see [6] p 53 and [9] p. 296.

Suppose now that f : S → ℝ3 is injective. It is well-known ([1], [7] p. 117, and [2] p. 161) that f(S) divides 3 into an inside region and an outside region whose intersection is f(S). Moreover, the inside region is homeomorphic to a closed ball, and f(S) is the boundary of that ball.

Definition: Let B ⊆ ℝ3 be a closed set and b0 ∈ B. Then B is starshaped at b0 iff for any b ∈ B the segment [b0, b] ⊆ B.

Definition: Let B ⊆ ℝ3 be a closed set with interior and b0 ∈ int (B). Then B is strictly starshaped at b0 iff for any b ∈ B the half-open segment [b0, b) ⊆ int (B).

So to be strictly starshaped, the segment [b0, b] cannot intersect B except possibly at b.

We now want to extend the concept of strictly starshaped from bodies B to surfaces f(S).

Definition: Let f : S → ℝ3 be as above, and p ∉ f(S). Then f(S) is strictly starshaped at p iff f is injective and the inside region B is strictly starshaped at p.

Note that this definition forces p to be in the interior of B.

Theorem: Let f : S → ℝ3 be as above, and p ∉ f(S). Then these are equivalent:
  1. f(S) is strictly starshaped at p
  2. f is injective, and every ray based at p intersects f(S) in exactly one point
  3. the linking number of f(S) and p is +1 (resp. -1) and p is in the negative (resp. positive) open halfspace of every facet of f(S)

raytrace2trans() is one of the important functions in the package zonohedra. For the function to work well, we want Property b to be true for the 2-transition surface S2, but its truth or falsity is not readily computable. However, Property c. is easily computed, and if the surface fails the test, then raytrace2trans() issues a warning that the computed ray intersection may not be unique.



Higher-Transition Points in the Cube Qn

In Section 2, the 2-transition subcomplex Q2n ⊊ Qn was defined; it is the subset of points with 2 transitions. We now want to define the number of transitions for any point x ∈ Qn.

When defining the subcomplex Q2n above, Definition 2 used the set J2 of all (step) functions on [β0, βn] that take the values 0 or 1 and have two transitions or no transitions (jumps). Let J be the bigger set of all (step) functions on [β0, βn] that take the values 0 or 1 and have a finite number of transitions. The endpoints β0 and βn are identified, to form a circle. Equivalently, J is the set of all indicator functions 1A+ where A+ is a finite disjoint union of arcs in the circle. The symbol does not mean that there can be infinitely many transitions; it means that the transition count is finite but can be arbitrarily large. The transition count is twice the number of arcs, so for any f ∈ J the transition count of f is a well-defined even integer.

We now want to define the transition count of x ∈ Qn using the function p : J ↠ Qn, which is defined exactly as in Section 2.

Definition: For any x ∈ Qn define

By this definition, all x ∈ Q2n have 2 or 0 transitions. But if x ∉ Q2n then x has more than 2 transitions. Following [3], we say that x is a higher-transition point.

Given an x ∈ Qn, the transition count of x is easily computable. In the interval [0,1] the endpoints 0 and 1 are boundary values, and all other values are interior values.

First consider the case when all coordinate values of x are 0 or 1, so x is a vertex. The maximum transition count is when 0 and 1 alternate. A little consideration of small n yields the following table of counts.

3 4 5 6 7 n
max transition count for a vertex x 2 4 4 6 6 2⌊n/2⌋

At the other extreme is when all coordinate values are interior values, so x is an interior point. A little consideration of small n shows that one can make x = p(f) when f has transition counts in this table:

3 4 5 6 7 n
transition count for an interior point x 4 4 6 6 8 2⌊(n + 1)/2⌋

Finally, consider the general x ∈ Qn. Find all runs of interior values, and the 2 border values on either side of the run. These 2 border values are either equal or not equal. Let r be the length of a run and look up the # of transitions for this specific run in this table:

1 2 3 4 r
equal border values 2 2 4 4 2⌊(r + 1)/2⌋
unequal border values 0 2 2 4 2⌊r/2⌋

The numbers in the header row are the possible lengths of the run of interior values. For example, if the length of the run is 1, and the border values are equal the transition count for this sequence is 2. Take the sum of these counts over all runs of interior values. Next, strip out all interior values completely, to leave a circular sequence of 0s and 1s. Compute the number of transitions of this “stripped” sequence in the usual way, and add to the previous sum. This final sum is the transition count for any x ∈ Qn. This shows that p : J ↠ Qn truly is surjective.

We are mostly interested in the case when L(x) ∈ ∂Z, and then x has at most 2 interior values and the length of a run of interior values is either 1 or 2. From the above algorithm it is clear that for a fixed parallelogram 𝒫 ⊂ ∂Z, and for any x that maps to the interior of 𝒫, the transition count of x is a constant. Thus we can write about the transition count for any parallelogram 𝒫 ⊂ ∂Z.

Given indexes i and j of generators of Z, the transition count for the corresponding parallelogram(s) in Z is fairly easy to compute. The algorithm is in the proof of the theorem in section 7. Let be the line through vertices vi and vj in the generator polygon P. Then then transition count is the number of times that cuts P. This algorithm is also present in [10].



Parallelograms in S2 and Z, revisited

By the previous theorem, if the generator polygon P is not simple and convex, then S2 ≠ ∂Z. This means there is a parallelogram in S2 that is in the interior of Z.

Let {i, j} be an unordered pair of indexes for such a parallelogram. Consider the slabs 𝒮{i, j} and 𝒮2{i, j} defined above. For simplicity, drop the {i, j} to get just 𝒮 and 𝒮2.

Since this parallelogram in S2 is in the interior of the slab, the functional defining the slabs is not maximized on the parallelogram, so we call it deficient. The difference between the functional values on the two parallelograms is called the deficit. The corresponding parallelogram in Z is called abundant because every z in this parallelogram is the image under L of a higher-transition x ∈ Qn. To summarize, each deficient parallogram in S2 has a matching abundant parallelogram in Z. This is illustrated in the left side of the next figure. The bold line segments correspond to the parallelograms and their antipodals. The outward-pointing normals define the functionals to be maximized. The 2 slabs are labeled. Note 𝒮2 is a proper subset of 𝒮; in symbols 𝒮2 ⊊ 𝒮.

Figure 10.1

Figure 10.1

On the other hand, if a parallelogram of S2 is in the boundary of the slab 𝒮, then the two parallelograms are equal and we call them coincident. It means that every z in this parallelogram is the image of an x ∈ Qn that has 2 (or 0) transitions. This is illustrated in the right side of the above figure.

To get data about the abundant and coincident parallelograms in Z, use the functions transitionsdf(), for example:

matgen = colorimetry.genlist[[2]]   # the CIE 1931 CMFs at 1nm step
matgen = 100 * matgen / sum( matgen[2, ] )   # it's traditional to scale so the center has Y=50
zono =  zonohedron( matgen )
getcenter(zono) ; dim( getmatrix( getsimplified( getmatroid(zono) ) ) )
##        x        y        z 
## 50.00400 50.00000 50.01653
## [1]   3 340
transitionsdf( zono )
##        transitions parallelograms     area.min     area.max   area.sum   deficit.min   deficit.max   example
## 1                2          93360 7.114460e-09 2.003446e+00 33110.4010 -1.776357e-13  1.563194e-13 {446,587}
## 2                4          12770 2.296428e-10 6.361879e-01   542.5573  9.426770e-11  2.071725e+00 {558,606}
## 3                6           6570 4.248782e-11 5.593713e-01   573.7907  2.149675e-08  9.832775e-03 {565,605}
## 4                8           1802 5.703649e-09 5.000034e-01   315.2465  4.329429e-07  5.726933e-03 {570,608}
## 5               10            758 6.674710e-04 4.727684e-01   127.2270  7.274884e-05  2.353013e-03 {572,608}
## Totals          NA         115260           NA           NA 34669.2224            NA            NA

The number of (simplified) generators of zono is n = 340, indexed from 360 to 699. So the total number of parallelograms is 340(340 − 1) = 115260. Data in the first row are for the coincident parallelograms, with 2 transitions. These form the majority of Z, with about 33110/34669 = 95.5% of the surface area. Data in the rows below is for the abundant parallelograms. More transitions typically have fewer parallelograms. The last column has an example of a parallelogram with the given transition count. For example, there are 1802 parallelograms in Z with 8 transitions, and the one given by generators {570, 608} is one of them. This means that the line through v570 and v608 cuts P in 8 places. Here is a plot of the point in the cube that maps to the center of the parallelogram:

oldpar = par( omi=c(0,0,0,0), mai=c(0.45,0.5,0.1,0) )
gnd = getground( getsimplified( getmatroid(zono) ) )
pcube = boundarypgramdata( zono, c(570,608), cube=TRUE )$pcube
xlim = range( gnd[which(0<pcube)] ) + 20*c(-1,1)
plot( xlim, c(0,1), type='n', xlab='', ylab='', las=1, lab=c(5,10,7), cex.axis=0.8 )
grid( col='gray', lty=1 )
lines( gnd, pcube, type='s' )
Figure 10.2

Figure 10.2

par( oldpar )

Note that the values at 570 and 608 are both 1/2, and all the other values are 0 or 1.


The following figure is a helpful 3D visualization of all the abundant parallelograms:

library( orientlib )
user3x3 = orientlib::rotmatrix( orientlib::eulerzyx( -0.249417, 0.7116067, 2.324364 ) )@x
dim(user3x3) = c(3,3)
par3d( userMatrix=rotationMatrix(matrix=user3x3), zoom=0.35 )
plothighertrans( zono )
Figure 10.3

Figure 10.3

In this figure, the abundant parallelograms are color-coded following [3]; dark red for 4, yellow for 6, blue for 8, and purple for 10 transitions. The view is looking up the “neutral axis” with a black point at 0, a white point at the opposite point, and a gray point at the center of symmetry. The central symmetry of the abundant parallelograms is clear. Compare this with Figure 7 in [3].




References

[1]
ALEXANDER, J. W. On the subdivision of 3-space by a polyhedron. Proceedings of the National Academy of Sciences [online]. 1924, 10(1), 6–8. Available at: doi:10.1073/pnas.10.1.6
[2]
BING, R. H. The geometric topology of 3-manifolds. B.m.: American Mathematical Society, 1983. American mathematical society colloquium publications, v. 40. ISBN 9780821810408.
[3]
BURNS, Scott A. The location of optimal object colors with more than two transitions. Color Research & Application [online]. 2021, 46(6), 1180–1193. Available at: doi:https://doi.org/10.1002/col.22693
[4]
GÜNTHER WYSZECKI AND W.S. STILES. Color Science : Concepts and Methods, Quantitative Data and Formulae. Second. B.m.: Wiley-Interscience, 1982.
[5]
LOGVINENKO, Alexander D. An object-color space. Journal of Vision [online]. 2009, 9(11), 5. Available at: doi:10.1167/9.11.5
[6]
MILNOR, J. and WEAVER, D. W. Topology from the differentiable viewpoint. B.m.: Princeton University Press, 1997. Princeton landmarks in mathematics and physics. ISBN 9780691048338.
[7]
MOISE, E. E. Geometric topology in dimensions 2 and 3. B.m.: Springer New York, 2013. Graduate texts in mathematics. ISBN 9781461299066.
[8]
SCHRÖDINGER, Erwin. Theorie der pigmente von größter leuchtkraft. Annalen der Physik [online]. 1920, 367(15), 603–622. ISSN 1521-3889. Available at: doi:10.1002/andp.19203671504
[9]
SPIVAK, Michael. A comprehensive introduction to differential geometry. Third. B.m.: Publish or Perish, Incorporated, 1999. Volume 1. ISBN 9780914098706.
[10]
WEST, G. AND BRILL, M. H. Conditions under which Schrödinger object colors are optimal. Journal of the Optical Society of America. 1983, 73, 1223–1225.




Session Information

This document was prepared Sun Sep 08, 2024 with the following configuration:
R version 4.4.1 (2024-06-14)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.1 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

time zone: Etc/UTC
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] orientlib_0.10.5 rgl_1.3.1        zonohedra_0.3-0  rmarkdown_2.28  

loaded via a namespace (and not attached):
 [1] microbenchmark_1.5.0 cli_3.6.3            knitr_1.48          
 [4] rlang_1.1.4          xfun_0.47            highr_0.11          
 [7] jsonlite_1.8.8       glue_1.7.0           buildtools_1.0.0    
[10] htmltools_0.5.8.1    maketools_1.3.0      sys_3.4.2           
[13] sass_0.4.9           evaluate_0.24.0      jquerylib_0.1.4     
[16] fastmap_1.2.0        base64enc_0.1-3      yaml_2.3.10         
[19] lifecycle_1.0.4      compiler_4.4.1       htmlwidgets_1.6.4   
[22] digest_0.6.37        R6_2.5.1             magrittr_2.0.3      
[25] bslib_0.8.0          logger_0.3.0         tools_4.4.1         
[28] cachem_1.1.0