pub fn evaluate<P: Blend>(
knots: &KnotVector,
control: &[P],
u: f64,
tol: Tolerances,
) -> OgeomResult<P>Expand description
Evaluate a B-spline at u by de Boor’s algorithm.
Numerically the right way to do it: a sequence of convex combinations of control points, so the result stays inside their hull and no intermediate can blow up. Evaluating the basis functions and taking a weighted sum gives the same answer in exact arithmetic but is less stable, and expanding the polynomial in monomials is far worse.
§Errors
OgeomError::Dimension if the control point
count disagrees with the knot vector; OgeomError::Domain
if u is outside the domain.