boundarypgramdata: compute data about specific parallelograms in the boundary of...

View source: R/zonohedron.R

boundarypgramdataR Documentation

compute data about specific parallelograms in the boundary of a zonohedron

Description

The boundary of a zonohedron is the union of parallelograms, where some of them may be facets, and some may be tiles in the standard tiling of more complex facets. The edges of each parallelogram are given by a pair of distinct generators. If a zonohedron has n of these generators, then there are n(n{-}1)/2 such pairs. However, if the two generators are multiples of each other, or 0, the parallelogram is degenerate and does not count. For each pair of generators, there are 2 parallelograms which are antipodal to each other. The total number of parallelograms is n(n{-}1). This function computes data about one parallelogram from this antipodal pair.

Usage

boundarypgramdata( x, gndpair, cube=FALSE )

Arguments

x

a zonohedron object as returned by the constructor zonohedron()

gndpair

an Mx2 integer matrix. Each row of gndpair must contain a pair of points in the ground set of the matroid of the zonohedron x. If the 1st point is less that the 2nd point, then the standard parallelogram is used. If the 2nd point is less than the 1st point, then the antipodal parallelogram is used. If one of the points is not in the ground set of the matroid, it is a silent error and all the returned data is set to NA. If the two vector generators are multiples of each other, or 0, then the parallelogram is degenerate and all the returned data is set to NA.
gndpair can also be a numeric vector that can be converted to such a matrix, by row.

cube

if TRUE, then a point of the cube that maps to the center of the given parallelogram is returned, see Value.

Value

boundarypgramdata() returns a data.frame with M rows and these columns:

gndpair

the given gndpair

hyperplaneidx

the index of the hyperplane in the simplified matroid of x that contains gndpair

center

the center of the standard or antipodal parallelogram. The centers of the standard and antipodal parallelograms add to white.

transitions

the number of transitions in pcube - a point in the n-cube that maps to center, where n is the number of generators of x. This is a positive even integer.

And if cube is TRUE, then this column is added:

pcube

a point in the n-cube that maps to center. The sum of the spectra of the standard and the antipodal spectra is identically 1.

If a row of gndpair has an invalid pair, the other columns are filled with NAs.

In case of global error, the function returns NULL.

See Also

zonohedron()

Examples

zono =  zonohedron( colorimetry.genlist[[2]] )
boundarypgramdata( zono, c(570,608,  608,570, 400,450,  650,700,  650,720, 700,720,  650,900) )
##   gndpair.1 gndpair.2 hyperplaneidx     center.x     center.y     center.z transitions
## 1       570       608         49284  34.01432310  23.49690880   0.03214207           8
## 2       608       570         49284  72.85114639  83.36000830 106.86010920           8
## 3       400       450         12831   9.89612333   0.57529647  49.17990701           2
## 4       650       700             1   4.58023729   1.69316773   0.00000000           2
## 5       650       720             1   4.70484309   1.73816516   0.00000000           2
## 6       700       720            NA           NA           NA           NA          NA
## 7       650       900            NA           NA           NA           NA          NA

# In rows 1 and 2, the ground pairs are swapped, so the hyperlane index remains the same
# but the parallelograms are antipodal; the sum of their centers is the white point.
# Row 3 is a parallelogram facet, which is the usual situation.
# In rows 4 and 5, since generators for ground points 700 and 720 are multiples,
# the hyperplane index is the same. Both parallelograms are in a tiling of a non-trivial facet.
# In row 6, since the generators are multiples, the parallelogram is degenerate.
# In row 7, the point 900 is not in the ground set, so the parallelogram is undefined.

zonohedra documentation built on April 3, 2025, 8:11 p.m.