loading... Pacem JS

Convex Hull

Convex hull of a set of points using monotone chain algorithm. O(n log n) time complexity.

// sample use
const points = [{x: x0, y: y0}, ..., {x: xn, y: yn}];
const hull = Pacem.Geometry.Utils.convexHull(points);