hgeometry-0.10.0.0: Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone
LanguageHaskell2010

Algorithms.Geometry.ConvexHull.GrahamScan

Synopsis

Documentation

convexHull :: (Ord r, Num r) => NonEmpty (Point 2 r :+ p) -> ConvexPolygon p r Source #

\(O(n \log n)\) time ConvexHull using Graham-Scan. The resulting polygon is given in clockwise order.

upperHull :: (Ord r, Num r) => NonEmpty (Point 2 r :+ p) -> NonEmpty (Point 2 r :+ p) Source #

Computes the upper hull. The upper hull is given from left to right.

lowerHull :: (Ord r, Num r) => NonEmpty (Point 2 r :+ p) -> NonEmpty (Point 2 r :+ p) Source #

Computes the upper hull. The upper hull is given from left to right