Socket
Book a DemoInstallSign in
Socket

qhull-js

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qhull-js

A port of qhull to JavaScript

latest
Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

qhull.js

A JavaScript port of qhull.

Installation

Via npm:

npm install qhull

Example

Here is an example showing how to compute the convex hull of a set of points:

console.log(require("qhull")([[0, 0], [10, 0], [0, 10], [10, 10], [5, 5]]));

Prints:

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

require("qhull")(points)

This function computes the n-dimensional convex hull of a collection of points.

  • points is an array of length n-arrays of points

Returns the convex hull of points represented by an array of facets each encoded as indices into points.

Notes

Currently, the library weighs in at around 3MB unminified. Patches welcome!

Credits

QHull is (c)1993-2013 C.B. Barber (See COPYING.txt)

JavaScript port by Mikola Lysenko, 2013

Keywords

qhull

FAQs

Package last updated on 19 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts