pub trait ParamCurveDeriv {
    type DerivResult: ParamCurve;

    // Required method
    fn deriv(&self) -> Self::DerivResult;

    // Provided method
    fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64 { ... }
}
Expand description

A differentiable parametrized curve.

Required Associated Types§

source

type DerivResult: ParamCurve

The parametric curve obtained by taking the derivative of this one.

Required Methods§

source

fn deriv(&self) -> Self::DerivResult

The derivative of the curve.

Note that the type of the return value is somewhat inaccurate, as the derivative of a curve (mapping of param to point) is a mapping of param to vector. We choose to accept this rather than have a more complex type scheme.

Provided Methods§

source

fn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64

Estimate arclength using Gaussian quadrature.

The coefficients are assumed to cover the range (-1..1), which is traditional.

Implementors§