Print summary of a mesh and plot 2D and 3D simplices. The 2D plot routines use the standard R plots; 3D plot routines use the rgl package.
# S3 method for mvmesh
print( x, ... )
# S3 method for mvmesh
plot( x, new.plot=TRUE, show.points=FALSE, show.edges=TRUE, show.faces=FALSE,
show.labels = FALSE, label.values=NULL, ... )
DrawSimplex2d(S,label,show.labels,mvmesh.type,show.edges=TRUE,show.faces=FALSE,...)
DrawSimplex3d(S,label,show.labels,mvmesh.type,show.edges=TRUE,show.faces=FALSE,...)
an object of class "mvmesh", usually from one of the functions
UnitSimplex
, SolidSimplex
,
UnitSphere
, UnitBall
, RectangularMesh
, etc.
If TRUE, start a new plot; otherwise add to an existing plot
If TRUE, show vertices (use cex= to change size)
If TRUE, show edges
If TRUE, fill in solid faces (only works in certain cases); otherwise show edges
If TRUE, an identifying label will be drawn inside each simplex
values to display if show.label=TRUE; defaults to 1,2,3,...
Optional argument to plot functions to set color, alpha, etc.
Integer to label current simplex
a simplex, an n x m matrix with columns S[,1],...,S[,m] giving the vertices
integer code identifying what type of mesh this is, see the
definition of class "mvmesh" in mvmesh
.
A plot is drawn, usually nothing is returned
print
will print out summary information about a mesh object
plot
will plot a mesh, calling DrawSimplex2d
or DrawSimplex3d
to plot a each simplex as appropriate for the dimension. These routines are meant to
give a basic display; not all rgl capabilities are used.
# NOT RUN {
print( SolidSimplex( n=3, k=2 ) )
# }
# NOT RUN {
plot( SolidSimplex( n=3, k=2 ), col='red' )
# }
Run the code above in your browser using DataLab