pub trait ParamCurveArclen: ParamCurve {
    fn arclen(&self, accuracy: f64) -> f64;

    fn inv_arclen(&self, arclen: f64, accuracy: f64) -> f64 { ... }
}
Expand description

A parametrized curve that can have its arc length measured.

Required Methods§

The arc length of the curve.

The result is accurate to the given accuracy (subject to roundoff errors for ridiculously low values). Compute time may vary with accuracy, if the curve needs to be subdivided.

Provided Methods§

Solve for the parameter that has the given arclength from the start.

This implementation is bisection, which is very robust but not necessarily the fastest. It does measure increasingly short segments, though, which should be good for subdivision algorithms.

Implementors§