| Copyright | (C) Frank Staals |
|---|---|
| License | see the LICENSE file |
| Maintainer | Frank Staals |
| Safe Haskell | None |
| Language | Haskell2010 |
Data.Geometry.PlanarSubdivision
Description
Data type to represent a PlanarSubdivision
Synopsis
- module Data.Geometry.PlanarSubdivision.Basic
- fromPolygons :: (Foldable1 c, Ord r, Fractional r) => proxy s -> f -> c (Polygon t p r :+ f) -> PlanarSubdivision s p () f r
- fromPolygons' :: forall proxy c s p r f. (Foldable1 c, Ord r, Fractional r) => proxy s -> f -> c (SomePolygon p r :+ f) -> PlanarSubdivision s p () f r
- fromPolygon :: forall proxy t p f r s. (Ord r, Fractional r) => proxy s -> Polygon t p r -> f -> f -> PlanarSubdivision s p () f r
Documentation
Arguments
| :: (Foldable1 c, Ord r, Fractional r) | |
| => proxy s | |
| -> f | outer face data |
| -> c (Polygon t p r :+ f) | the disjoint polygons |
| -> PlanarSubdivision s p () f r |
Constructs a planar subdivision from a collection of \(k\) disjoint polygons of total complexity \(O(n)\).
pre: The boundary of the polygons is given in counterclockwise orientation
runningtime: \(O(n\log n\log k)\) in case of polygons with holes, and \(O(n\log k)\) in case of simple polygons.
Arguments
| :: (Foldable1 c, Ord r, Fractional r) | |
| => proxy s | |
| -> f | outer face data |
| -> c (SomePolygon p r :+ f) | the disjoint polygons |
| -> PlanarSubdivision s p () f r |
Version of fromPolygons that accepts SomePolygons as input.
Arguments
| :: (Ord r, Fractional r) | |
| => proxy s | |
| -> Polygon t p r | |
| -> f | data inside |
| -> f | data outside the polygon |
| -> PlanarSubdivision s p () f r |
Construct a planar subdivision from a polygon. Since our PlanarSubdivision models only connected planar subdivisions, this may add dummy/invisible edges.
pre: The outer boundary of the polygons is given in counterclockwise orientation
running time: \(O(n)\) for a simple polygon, \(O(n\log n)\) for a polygon with holes.