Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Data.Geometry.Visibility
- data Point = Point !Double !Double
- data Polygon = Polygon SimplePolygon [SimplePolygon]
- newtype SimplePolygon = Simple [Point]
- visibilityPolygon :: Point -> Polygon -> SimplePolygon
Documentation
Constructors
Polygon SimplePolygon [SimplePolygon] |
newtype SimplePolygon Source
visibilityPolygon :: Point -> Polygon -> SimplePolygon Source
Given a Point and a Polygon (possibly with holes), returns a SimplePolygon describing the area visible from the Point inside of the Polygon. O(n log n) where n is the number of points.