convex_hull 1.0.0 copy "convex_hull: ^1.0.0" to clipboard
convex_hull: ^1.0.0 copied to clipboard

outdated

Calculates the convex hull of a given set of points. Monotone chain is used as algorithm.

example/convex_hull_example.dart

import 'package:convex_hull/convex_hull.dart';

void main() {
  final points = <Point2d>[
    Point2d(0.0, 0.0),
    Point2d(2.0, 0.0),
    Point2d(2.0, 2.0),
    Point2d(0.0, 2.0),
    Point2d(1.0, 1.0), // lies within convex hull
  ];

  convexHull(points);
  // >>> [(0.0, 0.0), (2.0, 0.0), (2.0, 2.0), (0.0, 2.0)]
}
2
likes
0
points
2.05k
downloads

Publisher

unverified uploader

Weekly Downloads

Calculates the convex hull of a given set of points. Monotone chain is used as algorithm.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

logging

More

Packages that depend on convex_hull