hgeometry-0.7.0.0: Geometric Algorithms, Data structures, and Data types.

Safe HaskellNone
LanguageHaskell2010

Data.Geometry.PlanarSubdivision

Synopsis

Documentation

fromPolygon Source #

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.

fromPolygons Source #

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)\)