Plot a zonohedron object in 3D, with many options.
# S3 method for zonohedron
plot( x, type='e', pcol=NULL, ecol=NULL, ewd=3, etcol=NA,
fcol=NULL, falpha=1, normals=FALSE, bgcol="gray40", both=TRUE, ... )
The function returns TRUE
; or FALSE
in case of error.
a zonohedron object as returned by the constructor zonohedron()
a string of letter with what parts to draw.
If type
contains an 'p'
, then draw a point at the center
of each facet.
If type
contains an 'e'
, then draw the edges.
If type
contains an 'f'
, then draw filled facets.
The color to use when drawing points.
It can be a vector of 2 colors, and then when both
is TRUE
,
the first color is used for one half,
and the second color is used for the antipodal half.
When pcol
is NULL
,
it is set to c('black','red')
.
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.
ecol
can be a vector of N colors, one for each zone.
If ecol
is shorter than N, it is extended to length N using the last color.
If ecol
is longer than N, the extra colors are ignored.
If ecol
is NULL
, it is set to rainbow(N)
.
width of the edges, in pixels
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 etol=NA
means do not draw these edges.
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 fcol
is NULL
, it is set to
c( 'blue', 'red', 'yellow', 'green', 'orange', 'purple' )
.
opacity of the facets
if TRUE
then draw an outward-pointing unit normal from each facet
the background color
if FALSE
then draw only one half of the centrally symmetric boundary.
Otherwise draw both halves.
This affects points, edges, and facets.
not used
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()
.
zonohedron()
,
spherize.zonotope()