| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Geometry.PlanarSubdivision
Synopsis
- module Data.Geometry.PlanarSubdivision.Basic
- 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
- fromPolygons :: (Ord r, Fractional r) => proxy s -> NonEmpty (SimplePolygon p r :+ f) -> f -> PlanarSubdivision s (Maybe p) () f r
Documentation
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.
running time: \(O(n)\) for a simple polygon, \(O(n\log n)\) for a polygon with holes.
Arguments
| :: (Ord r, Fractional r) | |
| => proxy s | |
| -> NonEmpty (SimplePolygon p r :+ f) | |
| -> f | data outside the polygons |
| -> PlanarSubdivision s (Maybe p) () f r |
Given a list of *disjoint* polygons, construct a planarsubdivsion representing them. This may create dummy vertices which have no vertex data, hence the 'Maybe p' data type for the vertices.
running time: \(O(n\log n)\)