Copyright | (C) Frank Staals |
---|---|
License | see the LICENSE file |
Maintainer | Frank Staals |
Safe Haskell | None |
Language | Haskell2010 |
The \(O((n+k)\log n)\) time line segment intersection algorithm by Bentley and Ottmann.
Synopsis
- intersections :: forall p r e. (Ord r, Fractional r) => [LineSegment 2 p r :+ e] -> Intersections p r e
- interiorIntersections :: (Ord r, Fractional r) => [LineSegment 2 p r :+ e] -> Intersections p r e
Documentation
intersections :: forall p r e. (Ord r, Fractional r) => [LineSegment 2 p r :+ e] -> Intersections p r e Source #
Compute all intersections
\(O((n+k)\log n)\), where \(k\) is the number of intersections.
interiorIntersections :: (Ord r, Fractional r) => [LineSegment 2 p r :+ e] -> Intersections p r e Source #
Computes all intersection points p s.t. p lies in the interior of at least one of the segments.
\(O((n+k)\log n)\), where \(k\) is the number of intersections.