pub fn approximate(
points: &[Point],
degree: usize,
control_count: usize,
spacing: Spacing,
tol: Tolerances,
) -> OgeomResult<BSplineCurve>Expand description
Fit a B-spline that passes near the points, with control_count control
points.
The first and last points are interpolated exactly: a fitted curve that does not start where the data starts is almost never wanted, and the ends are where a free least-squares fit goes worst.
ยงErrors
OgeomError::Construction if there are too
few points, if control_count does not leave the system overdetermined, or
if the normal equations are singular.