Learn R Programming

mvmesh (version 1.1)

UnitSimplex: 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)

Usage

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

Arguments

n
dimension of the space
k
number of subdivisions

Value

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

Details

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

Examples

Run this code
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 )

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

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

Run the code above in your browser using DataLab