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 parameterized curve.
Required Associated Types§
Sourcetype DerivResult: ParamCurve
 
type DerivResult: ParamCurve
The parametric curve obtained by taking the derivative of this one.
Required Methods§
Sourcefn deriv(&self) -> Self::DerivResult
 
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§
Sourcefn gauss_arclen(&self, coeffs: &[(f64, f64)]) -> f64
 
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.