Triangulates a bitmap image
MIT License
Triangulates a 2D bitmap image.
var pack = require("ndarray-pack")
var bitmap = pack([
[1, 1, 1, 1],
[1, 0, 1, 1],
[1, 1, 0, 1],
[1, 1, 1, 0]
])
var mesh = require("bitmap-triangulate")(bitmap)
npm install bitmap-triangulate
require("bitmap-triangulate")(bitmap)
Triangulates a 2D bitmap
bitmap
is a 2D ndarray encoding an imageReturns A simplicial complex with two properties:
cells
which are the faces of the triangulationpositions
which are the vertices(c) 2014 Mikola Lysenko. MIT License