Portability | GHC |
---|---|
Stability | highly unstable |
Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |
Safe Haskell | Safe-Infered |
Intersection of Paths with (infinite) lines.
- data Line u = Line (Point2 u) (Point2 u)
- inclinedLine :: Floating u => Point2 u -> Radian -> Line u
- vectorLine :: Num u => Vec2 u -> Point2 u -> Line u
- data Ray u = Ray (Point2 u) (Point2 u)
- inclinedRay :: Floating u => Point2 u -> Radian -> Ray u
- lineLineIntersection :: (Fractional u, Ord u, Tolerance u) => Line u -> Line u -> Maybe (Point2 u)
- linePathIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Line u -> AbsPath u -> Maybe (Point2 u)
- linePathSegmentIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Line u -> PathSegment u -> Maybe (Point2 u)
- rayPathIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Ray u -> AbsPath u -> Maybe (Point2 u)
- rayPathSegmentIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Ray u -> PathSegment u -> Maybe (Point2 u)
- rectangleRadialIntersect :: (Real u, Floating u, InterpretUnit u, Tolerance u) => u -> u -> Radian -> Maybe (Vec2 u)
- isoscelesTriangleRadialIntersect :: (Real u, Floating u, InterpretUnit u, Tolerance u) => u -> u -> Radian -> Maybe (Vec2 u)
Documentation
Infinite line represented by two points.
inclinedLine :: Floating u => Point2 u -> Radian -> Line uSource
inclinedLine
: point * ang -> Line
Make an infinite line passing through the supplied point
inclined by ang
.
inclinedRay :: Floating u => Point2 u -> Radian -> Ray uSource
Make an infinite ray starting from the supplied point
inclined by ang
.
lineLineIntersection :: (Fractional u, Ord u, Tolerance u) => Line u -> Line u -> Maybe (Point2 u)Source
interLineLine
: line1 * line2 -> Maybe Point
Find the intersection of two lines, if there is one.
Lines are infinite they are represented by points on them, they are not line segments.
An answer of Nothing
may indicate either the lines coincide
or the are parallel.
linePathIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Line u -> AbsPath u -> Maybe (Point2 u)Source
linePathSegmentIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Line u -> PathSegment u -> Maybe (Point2 u)Source
rayPathIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Ray u -> AbsPath u -> Maybe (Point2 u)Source
rayPathSegmentIntersection :: (Real u, Floating u, Ord u, Tolerance u) => Ray u -> PathSegment u -> Maybe (Point2 u)Source
rectangleRadialIntersect :: (Real u, Floating u, InterpretUnit u, Tolerance u) => u -> u -> Radian -> Maybe (Vec2 u)Source
Answer is vector from center.
isoscelesTriangleRadialIntersect :: (Real u, Floating u, InterpretUnit u, Tolerance u) => u -> u -> Radian -> Maybe (Vec2 u)Source
Answer is vector from centroid.