invertboundary {zonohedra}R Documentation

invert points on the boundary of a zonohedron

Description

A zonohedron Z is the image of a linear map [0,1]^n \to Z \subset \bold{R}^3, from the n-cube to 3D space. For a point on the boundary of the zonohedron, this function computes a point in the unit cube that maps to it. All coordinates of the point in the cube are 0 or 1, except for two of them. The point is not necessarily unique.

Usage

## S3 method for class 'zonohedron'
invertboundary( x, point, tol=5.e-14 )

Arguments

x

a zonohedron object as returned by the constructor zonohedron()

point

Mx3 matrix with points on the boundary of x in the rows. Such a matrix typically is returned by raytrace.zonohedron() or section.zonohedron(). point can also be a numeric vector that can be converted to such a matrix, by row.

tol

points that are not within tol of the boundary are skipped, see Details

Details

Given the boundary point, the function determines the facet that contains it. The pcube coordinates of the base vertex of this facet are all 0 or 1, and fairly easy to determine. If the facet is a parallelogram, the other two coordinates are fairly easy to determine too. If the facet is a zonogon with K generators, with K>2, then the unknown K coordinates are calculated using invert.zonogon().
Because of floating point behaviour, coordinates can be slightly negative or slightly more than 1. After the calculation, they are clamped to [0,1].

Value

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

point

the given boundary point

distance

signed distance to the boundary of x; for successful inversion its absolute value is \le tol

facetidx

index of the facet pair that contains the point

sign

sign of the facet pair; either +1 or -1

pcube

a point in the unit n-cube that maps to the given boundary point; all coordinates of pcube are 0 or 1, except for 2 of them.

transitions

the number of transitions in pcube - a non-negative even integer

If a point point cannot be inverted, e.g. because distance is too large, the other columns are all NA.

If the row names of point are unique, they are copied to the row names of the output. The column names of pcube are copied from the ground set of the associated matroid.

In case of global error, the function returns NULL.

See Also

zonohedron(), section.zonohedron(), raytrace.zonohedron(), invert.zonogon()


[Package zonohedra version 0.3-0 Index]