Sign in to follow this  

Parabolic interpolation?

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
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 this post


Link to post
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))] = 0

Expansion 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 this post


Link to post
Share on other sites
Quote:
Original post by Grizwald
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!


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

Share this post


Link to post
Share on other sites

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

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this