# Parabolic interpolation?

This topic is 5096 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

if I have a series of discrete points, would it be possible to interpolate with a parabola with its vertex at the point, and opening up or down depending on the point? I've seen cosine interpolation, and cubic interpolation, but wouldn't a parabolic interpolation be a bit faster? Almost as fast as linear? Just curious.

##### Share on other sites
There appears to be SOME info about parabolic interpolation out there. You just need to know 3 points, determine the extrema and fit a parabola. Apparently there are some problems with differentiating these, but that wouldn't be a problem. The only problem is that It seems to be a lot like the cubic method, so the real question is, what is the speed difference?

##### Share on other sites
You can use the method of least squares to derive a best-fit equation for ANY curve from a series of data points, then you can use this equation for interpolation. For instance for a parabola:

NOTE: sum_all = sigma(from i=1 to n) of known points (x1, y1) ... (xn, yn)(general form) y = a + bx + cx^2(general least squares) sum_all[yi - f(xi)]^2(1) (partial deriv by a) 2*sum_all[     (yi - (a + bxi + cxi^2))] = 0(2) (partial deriv by b) 2*sum_all[xi  *(yi - (a + bxi + cxi^2))] = 0(3) (partial deriv by c) 2*sum_all[xi^2*(yi - (a + bxi + cxi^2))] = 0Expansion of 1-3 yields (remember that xi, yi are your input points):sum_all(yi)      = a*sum_all(xi^0) + b*sum_all(xi^1) + c*sum_all(xi^2) sum_all(xi*yi)   = a*sum_all(xi^1) + b*sum_all(xi^2) + c*sum_all(xi^3)sum_all(xi^2*yi) = a*sum_all(xi^2) + b*sum_all(xi^3) + c*sum_all(xi^4)

Then simply solve for a, b, and c and you have the best-fit interpolation equation. You could probably optimize this process pretty well, although the linear interpolation method would be faster due to many powers xi must be raised to.

##### Share on other sites
Well i'll be sampling noise at all those points too, So I'm pretty sure that method is out. Cosine interpolation is smooth and fast for my needs right now. Thanks though!

##### Share on other sites
Quote:
 Original post by GrizwaldWell i'll be sampling noise at all those points too, So I'm pretty sure that method is out. Cosine interpolation is smooth and fast for my needs right now. Thanks though!

If you have exactly 3 points and are fitting a parabola, the least-squares fit should interpolate the 3 points exactly.

##### Share on other sites
Well, three values: these can also be derivatives. That's why cubic interpolation is so great: you need four values, usually the two end point and their derivatives so you can have C1 continuity.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633709
• Total Posts
3013481
×