| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | GHC2024 |
HGeometry.Polygon
Description
A polygon and some basic functions to interact with them.
Synopsis
- module HGeometry.Polygon.Class
- asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point)
- area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r
- area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r
- module HGeometry.Polygon.Simple
- module HGeometry.Polygon.Convex
Documentation
module HGeometry.Polygon.Class
asTriangle :: Polygon_ polygon point r => polygon -> Maybe (Triangle point) Source #
Try to convert the polygon into a triangle (whose vertices are given in CCW order).
area2X :: (Polygon_ polygon point r, Num r, Point_ point 2 r, SimplePolygon_ (Hole polygon) point r) => polygon -> r Source #
Computes the double area of a polygon
area :: (Polygon_ polygon point r, SimplePolygon_ (Hole polygon) point r, Fractional r) => polygon -> r Source #
The area of a polygon
running time: \(O(n)\)
module HGeometry.Polygon.Simple
module HGeometry.Polygon.Convex