mvmesh-methods: Methods to print and draw mvmesh objects

Description Usage Arguments Details Value Examples

Description

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.

Usage

1
2
3
4
5
6
7
## S3 method for class 'mvmesh'
print( x, ... )
## S3 method for class '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,...)

Arguments

x

an object of class "mvmesh", usually from one of the functions UnitSimplex, SolidSimplex, UnitSphere, UnitBall, RectangularMesh, etc.

new.plot

If TRUE, start a new plot; otherwise add to an existing plot

show.points

If TRUE, show vertices (use cex= to change size)

show.edges

If TRUE, show edges

show.faces

If TRUE, fill in solid faces (only works in certain cases); otherwise show edges

show.labels

If TRUE, an identifying label will be drawn inside each simplex

label.values

values to display if show.label=TRUE; defaults to 1,2,3,...

...

Optional argument to plot functions to set color, alpha, etc.

label

Integer to label current simplex

S

a simplex, an n x m matrix with columns S[,1],...,S[,m] giving the vertices

mvmesh.type

integer code identifying what type of mesh this is, see the definition of class "mvmesh" in mvmesh.

Details

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.

Value

A plot is drawn, usually nothing is returned

Examples

1
2
3
4
5
6
7
8
print( SolidSimplex( n=3, k=2 ) )

## Not run: 

plot( SolidSimplex( n=3, k=2 ), col='red' )


## End(Not run)

mvmesh documentation built on Feb. 12, 2020, 1:09 a.m.