Last data update: 2014.03.03

R: Define a mesh on the unit simplex or the canonical simplex
UnitSimplexR Documentation

Define a mesh on the unit simplex or the canonical simplex

Description

Defines an equal area/volume subdivision of the unit simplex and the canonical simplex in R^n. The unit simplex is the (n-1) dimensional simplex with vertices (1,0,0,...,0), (0,1,0,...,0), ...,(0,0,0,...,1), i.e. all x >= 0 with sum(x)==1.

The solid simplex is the n dimensional simplex with vertices (1,0,0,...,0), (0,1,0,...,0), ...,(0,0,0,...,1), and (0,0,...,0), i.e. all x >= 0 with sum(x) <= 1.

Usage

UnitSimplex(n, k )
SolidSimplex( n, k )

Arguments

n

dimension of the space

k

number of subdivisions

Details

EdgeSubdivision is called to do a k-subdivision of each edge, and then that output is converted to a matrix of vertices.

Value

an object of class "mvmesh" as described in mvmesh.

Examples


UnitSimplex( n=2, k=3 )
SolidSimplex( n=2, k=3 ) 

UnitSimplex( n=3, k=2 )
SolidSimplex( n=3, k=2 )

UnitSimplex( n=5, k=4 )
SolidSimplex( n=5, k=4 )

## Not run: 
plot( UnitSimplex( n=2, k=3 ) )
plot( SolidSimplex( n=2, k=3 ) )

plot( UnitSimplex( n=3, k=2 ) )
plot( SolidSimplex( n=3, k=2 ) )


## End(Not run)

Results