incremental-delaunay

Incremental Delaunay triangulation

npm install incremental-delaunay
8 downloads in the last week
24 downloads in the last month

incremental-delaunay

Incremental Delaunay triangulation data structure.

Example

var createTriangulation = require("incremental-delaunay")

var triangulation = createTriangulation(2, [
  [0,1],
  [1,0],
  [1,1]
])

API

var createTriangulation = require("incremental-delaunay")

Constructor

var triangulation = createTriangulation(dimension, points)

Creates a triangulation

  • dimension is the dimension of the ambient space
  • points is an array of points

Returns A DelaunayTriangulation object

Methods

triangulation.cells

An array of all cells in the triangulation

triangulation.points

An array of all points in the triangulation

triangulation.insert(point)

Adds point to the triangulation

triangulation.locate(point)

Returns the simplex containing point

Known bugs

This library is not currently robust. Pull requests and patches welcome.

Credits

(c) 2013 Mikola Lysenko. MIT License

npm loves you