Maintainer | diagrams-discuss@googlegroups.com |
---|---|
Safe Haskell | None |
Computing tangent and normal vectors for segments and trails.
- tangentAtParam :: Parametric (Tangent t) => t -> Scalar (V t) -> Codomain (Tangent t)
- tangentAtStart :: EndValues (Tangent t) => t -> Codomain (Tangent t)
- tangentAtEnd :: EndValues (Tangent t) => t -> Codomain (Tangent t)
- normalAtParam :: (Codomain (Tangent t) ~ R2, Parametric (Tangent t)) => t -> Scalar (V t) -> R2
- normalAtStart :: (Codomain (Tangent t) ~ R2, EndValues (Tangent t)) => t -> R2
- normalAtEnd :: (Codomain (Tangent t) ~ R2, EndValues (Tangent t)) => t -> R2
- newtype Tangent t = Tangent t
Documentation
tangentAtParam :: Parametric (Tangent t) => t -> Scalar (V t) -> Codomain (Tangent 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 R2 -> Double -> R2
Trail' Line R2 -> Double -> R2
Located (Trail R2) -> Double -> R2
See the instances listed for the Tangent
newtype for more.
tangentAtStart :: EndValues (Tangent t) => t -> Codomain (Tangent t)Source
Compute the tangent vector at the start of a segment or trail.
tangentAtEnd :: EndValues (Tangent t) => t -> Codomain (Tangent t)Source
Compute the tangent vector at the end of a segment or trail.
normalAtParam :: (Codomain (Tangent t) ~ R2, Parametric (Tangent t)) => t -> Scalar (V t) -> R2Source
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 R2 -> Double -> R2
Trail' Line R2 -> Double -> R2
Located (Trail R2) -> Double -> P2
See the instances listed for the Tangent
newtype for more.
normalAtStart :: (Codomain (Tangent t) ~ R2, EndValues (Tangent t)) => t -> R2Source
Compute the normal vector at the start of a segment or trail.
normalAtEnd :: (Codomain (Tangent t) ~ R2, EndValues (Tangent t)) => t -> R2Source
Compute the normal vector at the end of a segment or trail.
A newtype wrapper used to give different instances of
Parametric
and EndValues
that compute tangent vectors.
Tangent t |
(DomainBounds t, EndValues (Tangent t)) => EndValues (Tangent (Located t)) | |
(VectorSpace v, Num (Scalar v)) => EndValues (Tangent (Segment Closed v)) | |
(InnerSpace v, OrderedField (Scalar v), RealFrac (Scalar v)) => EndValues (Tangent (Trail v)) | |
(Parametric (GetSegment (Trail' c v)), EndValues (GetSegment (Trail' c v)), VectorSpace v, Num (Scalar v)) => EndValues (Tangent (Trail' c v)) | |
DomainBounds t => DomainBounds (Tangent t) | |
Parametric (Tangent t) => Parametric (Tangent (Located t)) | |
(VectorSpace v, Num (Scalar v)) => Parametric (Tangent (Segment Closed v)) | |
(InnerSpace v, OrderedField (Scalar v), RealFrac (Scalar v)) => Parametric (Tangent (Trail v)) | |
(Parametric (GetSegment (Trail' c v)), VectorSpace v, Num (Scalar v)) => Parametric (Tangent (Trail' c v)) |