hgeometry-polygon:quickcheck
Copyright(C) Frank Staals
Licensesee the LICENSE file
MaintainerFrank Staals
Safe HaskellNone
LanguageGHC2024

HGeometry.Polygon.Instances

Description

Arbitrary instances for the polygon types in hgeometry

Synopsis

Documentation

shrinkPolygon :: (Ord r, Fractional r, Real r) => SimplePolygon (Point 2 r) -> [SimplePolygon (Point 2 r)] Source #

Shrink a simple polygon.

The main idea is to try and remove every vertex (making sure that we still get a valid polygon). At the end, we try to simplify the coordinates of the points involved as well.

Orphan instances