Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/bitmap-triangulate
Triangulates a bitmap image
https://github.com/mikolalysenko/bitmap-triangulate
Last synced: about 2 months ago
JSON representation
Triangulates a bitmap image
- Host: GitHub
- URL: https://github.com/mikolalysenko/bitmap-triangulate
- Owner: mikolalysenko
- License: mit
- Created: 2014-03-04T04:07:11.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-04T16:36:04.000Z (almost 11 years ago)
- Last Synced: 2024-10-20T14:28:09.265Z (2 months ago)
- Language: JavaScript
- Size: 129 KB
- Stars: 6
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
bitmap-triangulate
==================
Triangulates a 2D bitmap image.# Example
```javascript
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)
```# Install
```
npm install bitmap-triangulate
```# API
### `require("bitmap-triangulate")(bitmap)`
Triangulates a 2D bitmap* `bitmap` is a 2D ndarray encoding an image
**Returns** A simplicial complex with two properties:
* `cells` which are the faces of the triangulation
* `positions` which are the vertices# Credits
(c) 2014 Mikola Lysenko. MIT License