For n points in any number of dimensions with coordinates P(n),

The function above interpolates the points within an error range of about 6% of the magnitude of the vector to each point... P(0) in the graph below is A, P(1) is B, up to P(6) being A again...

The above is 5 points of 2d vectors being interpolated... The nice thing about this formula is it applies to any number of points in any number of dimensions...

It goes very nearly through the midpoints between each pair of successive vertices, I think changing the e values in the formula to possibly two different numbers might be able to close in closer to the given points but maybe at the expense of not going as nicely through the midpoints...

The term inside the sum multiplying with the point vector is a normal distribution, with a value of 1 at a particular integer t value and tapering off on each side so that it's roughly 1/2 at the half integers on either side. The ideal would be a distribution with a peak of 1 at an integer t value and a value of exactly 1/2 at each half integer on either side and going completely to 0 everywhere at the integers on either side and beyond, but I think that's only really possible to approximate with a closed form function... Also if you go all the way to a triangular distribution over the interval so you make perfectly the polygon including the points you lose the nice property that the derivative is defined continuously everywhere...

## No comments:

## Post a Comment