pub fn extend<P: Blend>(
knots: &KnotVector,
control: &[P],
at_end: bool,
span: f64,
continuity: usize,
tol: Tolerances,
) -> OgeomResult<Spline<P>>Expand description
Continue a clamped B-spline past one end by span in parameter: the
polynomial continuation of the curve’s own end derivatives, joined on.
The continuation is the Taylor polynomial of order continuity at the
end (the polynomial whose derivatives up to that order agree with the
curve’s there), expressed in Bernstein form over the new span, raised to
the spline’s degree and joined on with the knot at multiplicity
degree. The curve is continued rather than approximated: a polynomial
spline of degree at most continuity continues as itself, and so does
a rational curve’s homogeneous polynomial: a rational circle arc
continued at order two stays on its circle. Orders above the degree are
held to the degree, which is as smooth as the spline itself is.
Extended at the start, the original run keeps its parameters and the domain grows downward; at the end, upward.
§Errors
OgeomError::Construction if the
knot vector is not clamped or the span is not positive and finite; as
derivatives on a shape mismatch.