zonohedron {zonohedra} | R Documentation |
zonohedron construction
Description
Construct a zonohedron from a numeric matrix with 3 rows. Also construct some special zonohedra useful for testing.
Usage
zonohedron( mat, e0=0, e1=1.e-6, e2=1.e-10, ground=NULL )
polarzonohedron( n, m=n, height=pi, ground=NULL )
regularprism( n, m=n, axis=c(0,0,1), ground=NULL )
Arguments
mat |
a numeric 3xM matrix, where 3 |
e0 |
threshold for a column of |
e1 |
threshold, in a pseudo-angular sense, for non-zero column vectors to be multiples of each other, and thus members of a group of multiple (aka parallel) points in the associated matroid. It OK for a column to be a negative multiple of another. |
e2 |
threshold, in a pseudo-angular sense, for the planes spanned by pairs of column vectors to be considered coincident, and thus the columns to be in the same hyperplane of the associated matroid. |
ground |
The ground set of the associated matroid of rank 3 -
an integer vector in strictly increasing order, or |
n |
an integer |
m |
an integer with 2 |
height |
the z value at the apex of the zonohedron,
which is the sum of all the generators.
The z value of all the generators is set to make this happen.
When |
axis |
the axis of the regular prism. It must be a 3-vector with z value non-zero. |
Details
In zonohedron()
, the contruction of the zones (or belts) is optimized by following
the procedure in Heckbert.
The key step is sorting face normals that all lie on a great circle
of the unit sphere.
For polarzonohedron()
the circle is centered at
(0,0,height/n
) and parallel to the xy-plane.
The radius is height/n
.
For regularprism()
the circle is the unit circle in the xy-plane.
The 3-vector axis
is added as column m+1
of the matrix.
The returned zonohedron is the Minkowski sum of a zonogon and
the line segment defined by axis
.
If m
< n
, the zonogon may not be regular.
Both of these functions are useful for testing.
They load the matrix mat
and pass it to zonohedron()
.
Value
zonohedron()
and polarzonohedron()
return a list with S3 class 'zonohedron'
.
In case of error, e.g. invalid mat
,
the functions print an error message and returns NULL
.
Note
The ground set of positive integers should not be too sparse; otherwise performance may suffer.
References
B. L. Chilton and H. S. M. Coxeter. Polar Zonohedra. The American Mathematical Monthly. Vol 70. No. 9. pp. 946-951. 1963.
Paul Heckbert. An Efficient Algorithm for Generating Zonohedra. 3-D Technical Memo 11. 24 February 1985. Computer Graphics Lab. New York Institute of Technology
See Also
zonohedron()
,
zonoseg()
,