This project has moved. For the latest updates, please go here.

About CubicHermiteSplineInterpolation

May 4, 2012 at 11:51 PM

Sorry if i don't understand much about spline interpolation.

I've a image, after user clicks some point on it, I want to draw a curve by using interpolated points from the CubicHermiteSplineInterpolation.

The method signature to initialize the interpolation is:

/// <summary>
        /// Initialize the interpolation method with the given samples.
        /// </summary>
        /// <param name="t">Points t</param>
        /// <param name="x">Values x(t)</param>
        /// <param name="d">Derivatives x'(t)</param>
        public void  InitIList<double> tIList<double> x, IList<double> d)

could you please explain me what is the 3rd parameter: d(derivatives) and how to have it.

When i tried with the CubicSplineInterpolation, I don't need to have the derivatives parameter.



May 19, 2012 at 7:01 PM

The Cubic Hermite Spline interpolation expects not only the points, but also the slope (derivative, "angle") at each point.

The Cubic Spline interpolation uses the hermite interpolation internally, but computes the "best" derivatives automatically for you. Hence, just use the CubicSplineInterpolation if you don't want to provide/compute the derivatives yourself.