Triangulates an n-dimensional hypercube into a collection of simplices.
Note: In high dimensions, this triangulation is not very efficient. Pull requests welcome.
var triangulateCube =console
3 2 0 0 1 3
npm install triangulate-hypercube
Computes a decomposition of an n-dimensional hypercube into simplices using a naive permutation based algorithm.
dimensionis an integer representing the dimension of the hypercube to triangulate
Returns A list of
n dimensional simplices which subdivide the cube.
(c) 2014 Mikola Lysenko. MIT License