zonohedron-plot {zonohedra} | R Documentation |
plot a zonohedron
Description
Plot a zonohedron object in 3D, with many options.
Usage
## S3 method for class 'zonohedron'
plot( x, type='e', pcol=NULL, ecol=NULL, ewd=3, etcol=NA,
fcol=NULL, falpha=1, normals=FALSE, bgcol="gray40", both=TRUE, ... )
Arguments
x |
a zonohedron object as returned by the constructor |
type |
a string of letter with what parts to draw.
If |
pcol |
The color to use when drawing points.
It can be a vector of 2 colors, and then when |
ecol |
A vector of colors to use when drawing the edges.
Let N be the number of simplified generators of the zonohedron.
Each edge is parallel to exactly one of the generators,
so this divides the edges into N zones, or belts.
|
ewd |
width of the edges, in pixels |
etcol |
color of the tiling edges, for the standard tiling
of the facets by parallelograms.
This only applies to facets that are not parallelograms.
The default |
fcol |
A vector of colors to use when drawing the facets.
The 1st color is used for parallelograms,
the next color for hexagons, etc.
For facets with more edges than colors available, the last color is used.
If |
falpha |
opacity of the facets |
normals |
if |
bgcol |
the background color |
both |
if |
... |
not used |
Details
Points are drawn with rgl::points3d()
.
Edges are drawn with rgl::segments3d()
.
Edges of the tiles are drawn with rgl::quads3d()
.
Facets are drawn with rgl::quads3d()
;
facets with more than 4 edges are split into trapezoids.
Facet normals are drawn with rgl::arrow3d()
.
Value
The function returns TRUE
; or FALSE
in case of error.
Note
The package rgl is required for 3D plots. A large black point is drawn at 0, a 50% gray point at the center, and a large white point at the "white point" (which is 2*center).
A line from the black point to the white point is also drawn.
See Also
zonohedron()
,
spherize.zonotope()