views:

137

answers:

2

Assuming I have an array of doubles, what's a good algorithm to sample this series using Akima interpolation? I'm too stupid to translate that mathematical description into code.

// values is an array of doubles
// idx is the index of the left-hand value for the current interpolation
// t is the normalized parameter between values[idx] and values[idx+1]
// Don't worry about array bounds, I'll handle that separately.
public double InterpolateAkima(double[] values, int idx, double t)
{
  ...?
}
A: 

not Akima, but C++ for fast simple quadratic interpolation is here in SO.

Denis
I already coded up a bunch of interpolation algorithms including Cubic and CatmullRom, only Akima was missing...
David Rutten
+3  A: 

Got some hits on google code search but this isn't an area I know much about. The first result is for Math.NET which may be of some interest.

Kris
+1: Math.NET has an implementation indeed
Bertvan
It's in the `MathNet.Numerics.Interpolation` namespace
Keith