monotone-convex-hull-2d

WebJar for monotone-convex-hull-2d

License

License

MIT
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

monotone-convex-hull-2d
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

monotone-convex-hull-2d
WebJar for monotone-convex-hull-2d
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mikolalysenko/monotone-convex-hull-2d

Download monotone-convex-hull-2d

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/monotone-convex-hull-2d/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>monotone-convex-hull-2d</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/monotone-convex-hull-2d/
implementation 'org.webjars.npm:monotone-convex-hull-2d:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/monotone-convex-hull-2d/
implementation ("org.webjars.npm:monotone-convex-hull-2d:1.0.1")
'org.webjars.npm:monotone-convex-hull-2d:jar:1.0.1'
<dependency org="org.webjars.npm" name="monotone-convex-hull-2d" rev="1.0.1">
  <artifact name="monotone-convex-hull-2d" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='monotone-convex-hull-2d', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "monotone-convex-hull-2d" % "1.0.1"
[org.webjars.npm/monotone-convex-hull-2d "1.0.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : robust-orientation jar [1.1.3,2)

Project Modules

There are no modules declared in this project.

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.

Example

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

Versions

Version
1.0.1