Copyright | (c) 2013 diagrams-lib team (see LICENSE) |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | diagrams-discuss@googlegroups.com |
Safe Haskell | None |
Language | Haskell2010 |
Computing tangent and normal vectors for segments and trails.
Synopsis
- tangentAtParam :: Parametric (Tangent t) => t -> N t -> Vn t
- tangentAtStart :: EndValues (Tangent t) => t -> Vn t
- tangentAtEnd :: EndValues (Tangent t) => t -> Vn t
- normalAtParam :: (InSpace V2 n t, Parametric (Tangent t), Floating n) => t -> n -> V2 n
- normalAtStart :: (InSpace V2 n t, EndValues (Tangent t), Floating n) => t -> V2 n
- normalAtEnd :: (InSpace V2 n t, EndValues (Tangent t), Floating n) => t -> V2 n
- newtype Tangent t = Tangent t
Tangents
tangentAtParam :: Parametric (Tangent t) => t -> N t -> Vn t Source #
Compute the tangent vector to a segment or trail at a particular parameter.
Examples of more specific types this function can have include
Segment Closed V2 -> Double -> V2 Double
Trail' Line V2 -> Double -> V2 Double
Located (Trail V2) -> Double -> V2 Double
See the instances listed for the Tangent
newtype for more.
tangentAtStart :: EndValues (Tangent t) => t -> Vn t Source #
Compute the tangent vector at the start of a segment or trail.
tangentAtEnd :: EndValues (Tangent t) => t -> Vn t Source #
Compute the tangent vector at the end of a segment or trail.
Normals
normalAtParam :: (InSpace V2 n t, Parametric (Tangent t), Floating n) => t -> n -> V2 n Source #
Compute the (unit) normal vector to a segment or trail at a particular parameter.
Examples of more specific types this function can have include
Segment Closed V2 Double -> Double -> V2 Double
Trail' Line V2 Double -> Double -> V2 Double
Located (Trail V2 Double) -> Double -> V2 Double
See the instances listed for the Tangent
newtype for more.
normalAtStart :: (InSpace V2 n t, EndValues (Tangent t), Floating n) => t -> V2 n Source #
Compute the normal vector at the start of a segment or trail.
normalAtEnd :: (InSpace V2 n t, EndValues (Tangent t), Floating n) => t -> V2 n Source #
Compute the normal vector at the end of a segment or trail.
Tangent newtype
A newtype wrapper used to give different instances of
Parametric
and EndValues
that compute tangent vectors.
Tangent t |