# delaunay-triangulate

> Delaunay triangulations in any dimension

Latest version **1.1.6** (published 2014-06-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install delaunay-triangulate
pnpm add delaunay-triangulate
yarn add delaunay-triangulate
bun add delaunay-triangulate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.6 |
| Published | 2014-06-09 |
| First published | 2013-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 163 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | delaunay, exact, robust, geometry |

## Links

- npm: https://www.npmjs.com/package/delaunay-triangulate
- Repository: https://github.com/mikolalysenko/delaunay-triangulate
- Issues: https://github.com/mikolalysenko/delaunay-triangulate/issues
- npm.io page: https://npm.io/package/delaunay-triangulate

## Dependencies (2)

- [uniq](https://npm.io/package/uniq.md) ^1.0.1
- [incremental-convex-hull](https://npm.io/package/incremental-convex-hull.md) ^1.0.1

## Recent versions

- 1.1.6 (latest) — 2014-06-09
- 1.1.5 — 2014-06-09
- 1.1.4 — 2014-06-06
- 1.1.3 — 2014-06-05
- 1.1.2 — 2014-06-05
- 1.1.1 — 2014-06-02
- 1.0.1 — 2014-06-01
- 0.0.1 — 2013-10-26
- 0.0.0 — 2013-10-25

## README

delaunay-triangulate
====================
Triangulates a set of points into a [Delaunay triangulation](http://en.wikipedia.org/wiki/Delaunay_triangulation).  This code works in arbitrary dimensions, and both in the server and in the browser.

<img src="delaunay3d.png">

[![testling badge](https://ci.testling.com/mikolalysenko/delaunay-triangulate.png)](https://ci.testling.com/mikolalysenko/delaunay-triangulate)

[![build status](https://secure.travis-ci.org/mikolalysenko/delaunay-triangulate.png)](http://travis-ci.org/mikolalysenko/delaunay-triangulate)

Here are some in browser demos:

* [2D Delaunay triangulation](http://mikolalysenko.github.io/delaunay-triangulate/2d.html)
* [3D Delaunay triangulation](http://mikolalysenko.github.io/delaunay-triangulate/3d.html)

# Example

```javascript
var triangulate = require("delaunay-triangulate")

var points = [
  [0, 1],
  [1, 0],
  [1, 1],
  [0, 0],
  [0.5, 0.5]
]

var triangles = triangulate(points)

console.log(triangles)
```

# Install

    npm install delaunay-triangulate

# API

#### `require("delaunay-triangulate")(points[,pointAtInfinity])`
Constructs a Delaunay triangulation over `points`

* `points` is a collection of points in Euclidean space.
* `pointAtInfinity` is a flag, which if set adds an extra point at infinity to give the spherical compactification of the triangulation.  The index of the point at infinity is `-1`

**Returns** A list of cells representing the faces of the triangulation.  These are triangles in 2D or tetrahedra in 3D.

# Credits
(c) 2013-2014 Mikola Lysenko. MIT License

---
_Source: https://npm.io/package/delaunay-triangulate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
