triangulate-hypercube
Triangulates a hypercube into simplices
Last updated 11 years ago by mikolalysenko .
MIT · Repository · Bugs · Original npm
$ cnpm install triangulate-hypercube 
SYNC missed versions from official npm registry.

triangulate-hypercube

Triangulates an n-dimensional hypercube into a collection of simplices.

Note: In high dimensions, this triangulation is not very efficient. Pull requests welcome.

Example

var triangulateCube = require("triangulate-hypercube")

console.log(triangulateCube(2))

Output:

[ [ 3, 2, 0 ], [ 0, 1, 3 ] ]

Install

npm install triangulate-hypercube

API

require("triangulate-hypercube")(dimension)

Computes a decomposition of an n-dimensional hypercube into simplices using a naive permutation based algorithm.

  • dimension is an integer representing the dimension of the hypercube to triangulate

Returns A list of n dimensional simplices which subdivide the cube.

Credits

(c) 2014 Mikola Lysenko. MIT License

Current Tags

  • 1.0.1                                ...           latest (11 years ago)

1 Versions

  • 1.0.1                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org