// To use Spline x = new float[cpt-1]; y = new float[cpt-1]; for (int i = 0; i < cpt-1; i++) { for (int j = 1; j < names.Length+1; j++) { x[i] = nv_data[j-1].positions[i].x; // Data positions saved in text file y[i] = nv_data[j-1].positions[i].z; // Data positions saved in text file } } int n = 20; xs = new float[n]; float stepSize = (x[x.Length - 1] - x[0]) / (n - 1); for (int i = 0; i < n; i++) { xs[i] = xs[0] + i * stepSize; } // These two lines are not correct : CubicSpline and FitAndEval appear in red CubicSpline spline = new CubicSpline(); float[] ys = spline.FitAndEval(x, y, xs);
public CubicSpline spline; CubicSpline spline = new CubicSpline ();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)