Portability | GHC |
---|---|

Stability | highly unstable |

Maintainer | Stephen Tetley <stephen.tetley@gmail.com> |

Intersection of line to line and line to plane

- data LineSegment u = LS (Point2 u) (Point2 u)
- data PointSlope u
- pointSlope :: Fractional u => Point2 u -> Radian -> PointSlope u
- data LineEqn u
- lineEqn :: Num u => Point2 u -> Point2 u -> LineEqn u
- toLineEqn :: Num u => PointSlope u -> LineEqn u
- findIntersect :: (Floating u, Real u, Ord u) => Point2 u -> Radian -> [LineSegment u] -> Maybe (Point2 u)
- intersection :: (Fractional u, Ord u) => LineSegment u -> LineEqn u -> Maybe (Point2 u)
- rectangleLines :: Num u => Point2 u -> u -> u -> [LineSegment u]
- polygonLines :: [Point2 u] -> [LineSegment u]
- langle :: (Floating u, Real u) => Point2 u -> Point2 u -> Radian

# Documentation

data LineSegment u Source

Eq u => Eq (LineSegment u) | |

Ord u => Ord (LineSegment u) | |

Show u => Show (LineSegment u) |

data PointSlope u Source

Eq u => Eq (PointSlope u) | |

Show u => Show (PointSlope u) |

pointSlope :: Fractional u => Point2 u -> Radian -> PointSlope uSource

Line in equational form, i.e. `Ax + By + C = 0`

.

toLineEqn :: Num u => PointSlope u -> LineEqn uSource

findIntersect :: (Floating u, Real u, Ord u) => Point2 u -> Radian -> [LineSegment u] -> Maybe (Point2 u)Source

intersection :: (Fractional u, Ord u) => LineSegment u -> LineEqn u -> Maybe (Point2 u)Source

rectangleLines :: Num u => Point2 u -> u -> u -> [LineSegment u]Source

polygonLines :: [Point2 u] -> [LineSegment u]Source