Generically, a plane intersects the boundary of a
zonohedron in a convex polygon.
Computing that polygon is the chief goal of this function.
For a supporting plane, the intersection is a face of the zonohedron,
but in this function only one point of intersection is computed and returned.
# S3 method for zonohedron
section( x, normal, beta, tol=1.e-10, plot=FALSE, ... )
section.zonohedron()
returns a list of length M
(=length(beta)
),
and the i'th item in the list is a data frame with these columns:
a Px3 matrix with the P points of the i'th polygon in the rows.
If the plane does not intersect the zonohedron, then P=0
and the matrix has 0 rows.
If the plane is a supporting plane, the polygon is degenerate
and P=1 and the matrix has 1 row.
The row names of section
are the indexes of the facets
that contain the vertices of the polygon; see Details.
index of a hyperplane that contains the given point
The sign specifying which of the 2 facets (selected or antipodal) contains the given point. The value is +1 or -1.
The names of the list are readable strings that contain
normal
and beta[i]
.
In case of error, the function returns NULL
.
a zonohedron object as returned by the constructor zonohedron()
a non-zero numeric 3-vector - the normal of all the planes
a numeric M-vector of line-constants.
The equation of the k'th plane k is: <x,normal> = beta[k]
.
a small positive number, used as the tolerance for the plane being considered a supporting plane
if TRUE
, the polygons formed by the the intersection
of the planes and the boundary of the zonohedron are
added to an existing 3D plot of the zonohedron x
,
see plot.zonohedron()
.
The polygons are drawn in red.
not used
Given a plane, the function finds all the facets of the zonohedron
that intersect the plane.
For each such facet it computes a single point of intersection
on the boundary of the facet.
For the parallelograms, the computation is done in a C function;
and for zonogon facets with 3 or more generators,
the computation is done in section.zonogon()
.
Orientation is handled carefully so that no point appears twice.
The facets are not processed in order around the boundary,
so these points are in no particular order.
They are put in polygon order by sorting them by angle
around a suitable "diameter" of the zonohedron.
zonohedron()
,
plot.zonohedron()
,
section.zonogon()