Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- triangulate :: (Ord r, Fractional r) => proxy s -> Polygon t p r -> PlanarSubdivision s p PolygonEdgeType PolygonFaceData r
- triangulate' :: (Ord r, Fractional r) => proxy s -> Polygon t p r -> PlaneGraph s p PolygonEdgeType PolygonFaceData r
- computeDiagonals :: (Ord r, Fractional r) => Polygon t p r -> [LineSegment 2 p r]
- computeDiagonals' :: (Ord r, Fractional r) => Polygon t p r -> (Polygon t p r, [LineSegment 2 p r])
Documentation
triangulate :: (Ord r, Fractional r) => proxy s -> Polygon t p r -> PlanarSubdivision s p PolygonEdgeType PolygonFaceData r Source #
Triangulates a polygon of \(n\) vertices
running time: \(O(n \log n)\)
triangulate' :: (Ord r, Fractional r) => proxy s -> Polygon t p r -> PlaneGraph s p PolygonEdgeType PolygonFaceData r Source #
Triangulates a polygon of \(n\) vertices
running time: \(O(n \log n)\)
computeDiagonals :: (Ord r, Fractional r) => Polygon t p r -> [LineSegment 2 p r] Source #
Computes a set of diagaonals that together triangulate the input polygon of \(n\) vertices.
running time: \(O(n \log n)\)
computeDiagonals' :: (Ord r, Fractional r) => Polygon t p r -> (Polygon t p r, [LineSegment 2 p r]) Source #
Computes a set of diagaonals that together triangulate the input polygon of \(n\) vertices. Returns a copy of the input polygon, whose boundaries are oriented in counter clockwise order, as well.
running time: \(O(n \log n)\)