I'm trying to fit an Akima Spline curve in C# using the same method as this tool: https://www.mycurvefit.com/share/4ab90a5f-af5e-435e-9ce4-652c95c3d9a7
This curve gives me the exact shape I'm after (the curve line peaking at X = 30M, the highest point from the sample data)
But when I use MathNet's Akima function, and plot 52 points from the same data set:
var x = new List<double> { 0, 15000000, 30000000, 40000000, 60000000 };
var y = new List<double> { 0, 93279805, 108560423, 105689254, 90130257 };
var curveY = new List<double>();
var interpolation = MathNet.Numerics.Interpolation.CubicSpline.InterpolateAkima(x.ToArray(), y.ToArray());
for (int i=1; i<=52; i++)
{
var cY = interpolation.Interpolate((60000000/52)*i);
curveY.Add(cY);
}
I don't get the same curve at all, I get a curve which peaks around X = 26M, and looks much more like a Natural Spline: https://www.mycurvefit.com/share/faec5545-abf1-4768-b180-3e615dc60e3a
What is the reason the Akimas look so different? (especially in terms of peak)