# monotone-convex-hull-2d

> Robust 2D convex hull algorithm

Latest version **1.0.1** (published 2014-10-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install monotone-convex-hull-2d
pnpm add monotone-convex-hull-2d
yarn add monotone-convex-hull-2d
bun add monotone-convex-hull-2d
```

## 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.0.1 |
| Published | 2014-10-14 |
| First published | 2014-10-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | Mikola Lysenko |
| Maintainers | mikolalysenko |
| Keywords | monotone, convex, hull, 2d, fast, robust, geometry |

## Links

- npm: https://www.npmjs.com/package/monotone-convex-hull-2d
- Repository: https://github.com/mikolalysenko/monotone-convex-hull-2d
- Issues: https://github.com/mikolalysenko/monotone-convex-hull-2d/issues
- npm.io page: https://npm.io/package/monotone-convex-hull-2d

## Dependencies (1)

- [robust-orientation](https://npm.io/package/robust-orientation.md) ^1.1.3

## Alternatives

- [babylon](https://npm.io/package/babylon.md) — 5.1M weekly downloads
- [csscolorparser](https://npm.io/package/csscolorparser.md) — 3.7M weekly downloads
- [expr-eval-fork](https://npm.io/package/expr-eval-fork.md) — 1.5M weekly downloads
- [@leeoniya/ufuzzy](https://npm.io/package/@leeoniya/ufuzzy.md) — 247.7K weekly downloads
- [xml-parser](https://npm.io/package/xml-parser.md) — 78.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2014-10-14
- 1.0.0 — 2014-10-13

## README

monotone-convex-hull-2d
=======================
Computes the convex hull of a set of points in the plane in O(n log(n)) time using the Monotone chain algorithm.

* [Demo Link](https://mikolalysenko.github.io/monotone-convex-hull-2d/visualizer/index.html)

# Example

```javascript
var convexHull = require('monotone-convex-hull-2d')

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

console.log(convexHull(points))
```

Output:

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

# Install

```
npm install monotone-convex-hull-2d
```

# API

### `require('monotone-convex-hull-2d')(points)`
Construct the convex hull of a set of points.

* `points` is an array of points represented as an array of length 2 arrays

**Returns** The convex hull of the point set represented by a clockwise oriented list of indices.

# Credits
(c) 2014 Mikola Lysenko. MIT License

Visualizer (c) 2013 Dan Melanz

---
_Source: https://npm.io/package/monotone-convex-hull-2d · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
