convex_hull 1.0.1
convex_hull: ^1.0.1 copied to clipboard
Calculates the convex hull of a given set of points. Monotone chain is used as algorithm.
Calculates the convex hull of a given set of points. Monotone chain is used as algorithm.
Info #
Given a set of points, the convex hull is a subset of points which form a polygon that encloses all points. It does that using Andrew's monotone chain algorithm which has an efficient O(n log n) runtime.

Usage #
The library consists of the convexHull
function, which takes a list of Pointd2d
s and returns the convex hull.
import 'package:convex_hull/convex_hull.dart';
const points = [
Point2d(1, 2),
Point2d(3.2, 1),
Point2d(1.3, 1),
]
const hull = convexHull(points);