diagrams-lib-1.1.0.4: Embedded domain-specific language for declarative graphics

Maintainerdiagrams-discuss@googlegroups.com
Safe HaskellNone

Diagrams.Tangent

Description

Computing tangent and normal vectors for segments and trails.

Synopsis

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.

newtype Tangent t Source

A newtype wrapper used to give different instances of Parametric and EndValues that compute tangent vectors.

Constructors

Tangent t