There is a formula for evaluating a Catmull Rom spline segment at time 't' found here.
The problem with this is that it requires finding the two control points either side of the segment to evaluate.
Is there a formula for finding those two control points?
As a alternative I considered utilising some kind of algrorithm for finding the nearest values either side of a given value:
float lowerNearest = float.MaxValue;
float upperNearest = float.MinValue;
int numElements = array.Length;
for (int i = 0; i < numElements; ++i)
{
float dif = index - array[i].Index
if (dif > 0)
{
lowerNearest = Math.Min(lowerNearest, dif)
}
else
{
upperNearest = Math.Max(upperNearest, dif);
}
}
However I'm not sure what values I should be comparing as the control points are only vectors and felt that it was probably the incorrect way to approach this problem.