CatmullRomSplineInterpolation<T>
Models & Types · AiDotNet.Interpolation
Implements Catmull-Rom spline interpolation for smooth curve fitting through a series of points.
Implements: IInterpolation<T>
How It Works
Catmull-Rom splines create smooth curves that pass through all the provided data points, making them useful for animation paths, curve drawing, and data visualization.
For Beginners: Think of this as drawing a smooth curve through a set of dots. Unlike simpler methods that might create sharp corners or jagged lines, Catmull-Rom splines create naturally flowing curves that pass exactly through each point while maintaining smoothness.
Imagine connecting dots to draw the outline of a mountain range or a river - you want the line to flow naturally between points rather than making sharp turns. That’s what this interpolation method provides.
Constructors
| Constructor | Summary |
|---|---|
CatmullRomSplineInterpolation(Vector<T> x, Vector<T> y, double tension) |
Initializes a new instance of the CatmullRomSplineInterpolation class. |
Methods
| Method | Summary |
|---|---|
T Interpolate(T x) |
Interpolates a y-value at the specified x-coordinate using Catmull-Rom spline interpolation. |