UnitSimplex: Define a mesh on the unit simplex or the canonical simplex

Description Usage Arguments Details Value Examples

View source: R/mvmesh.R

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

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
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)

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