Method FromControlPoints
- Namespace
- GeometryHelper.Geometry
- Assembly
- GeometryHelper.dll
FromControlPoints(int, IEnumerable<GeoPoint3>)
Builds the clamped spline of a degree whose control points are given, with its knots as evenly spaced as they can be over [0, 1].
public static GeoSpline3 FromControlPoints(int degree, IEnumerable<GeoPoint3> controlPoints)
Parameters
degreeintThe degree, from 1 to 25.
controlPointsIEnumerable<GeoPoint3>The control points, at least degree + 1 and not all one point.
Returns
- GeoSpline3
The spline, not rational.
Remarks
Seven control points of degree 3 have the knots 0, 0, 0, 0, 1/4, 1/2, 3/4, 1, 1, 1, 1: the four spans of the curve take a quarter each of the parameter. With degree + 1 points it is the Bézier curve of the points.
Exceptions
- ArgumentNullException
Thrown when the control points are null.
- ArgumentOutOfRangeException
Thrown when the degree is outside 1 to 25.
- ArgumentException
Thrown when there are too few control points, or they are all one point.