pub fn approximate(
points: &[Point3],
degree: usize,
num_control_points: usize,
) -> Result<NurbsCurve, MathError>Expand description
Approximate a set of points with a NURBS curve of specified number of control points.
Uses least-squares fitting: the resulting curve minimizes the sum of
squared distances to the data points. The curve generally does NOT
pass through the points unless num_control_points == points.len().
ยงErrors
Returns an error if parameters are invalid.