# Interpolation over four points

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

## Recommended Posts

I have this quadratic interpolation formula for 3 points. It is from the book Practical Algorithms for 3D Computer Graphics. P = (2(P²-P°) - 4(P¹-P°))μ² - ((P²-P°) - 4(P¹-P°))μ + P° Where P is a point of the interpolation between μ=0 and μ=1. How do I expand this formula to interpolate between 4 or 5 points?

##### Share on other sites
I just started looking into cubic interpolation, bsplines, etc. From an algorithm from cubic interpolation:
(this'll take you to 4 anyway)

(P(x + 2) ^ 3 - 4 * P(x + 1) ^ 3 + 6 * P(x) ^ 3 - 4 * P(x - 1) ^ 3) / 6

where P(x) is a piecewise function:
x < 0: P = 0
x >= 0: P = x

You might check out b-splines on mathworld (or other similar resources)

-Michael g.

##### Share on other sites
Quote:
 (P(x + 2) ^ 3 - 4 * P(x + 1) ^ 3 + 6 * P(x) ^ 3 - 4 * P(x - 1) ^ 3) / 6
But this formula will require that I first solve for P for the set of 4 points, right? I'd rather use a formula that takes any 4 points - then I can blend sequences of these together to form a smooth interpolation.

I'm more interested in learning how this formula was created so that I can expand it to allow for 4 or 5 points.

##### Share on other sites
what exactly are you looking for? do you want a curve that interpolates control points? or one that just starts and ends in a position, basically you have cubic curves like bezier curves and you can design them to interpolate their first and last points. bezier/hermite/ bla bla bla all the same thing, just different ways to specify degree 3 curves. there are bezier curves of higher order but they suffer the same problems as degree three, namely they still only interpolate their first and last points. if you want a curve to interpolate multiple control points you can either use piece wise bezier curves that is treat each two points as piecewise degree 3 bezier curves, you basically design the curve such that the first dirivatives are perserved at the points where they match up. there are also bsplines like nerbs and even these curves don't interpolate their all their control points, but you can design a curve to interpolate a set of points with them. I'm not the type to blerp out formula without explaing them and there's to much to explain here I recomend the book 3-d computer graphics A mathematical introduction with open gl for a rigerious introduction to these curves.

bottom line, use
bezier curves to interpolate 2 points

use
picewise bezier curves or nerbs(rational bsplines) to inerpolate many points

increasing the order of your bezier curve doesnt' mean it will interpolate it's points the next order is given by P = P0(1-u)^3 + P1*3u(1-u)^2 + P2*3u^2(1-u) + p3*u^3

increasing the order doesnt' change the fact that this curve only interpolate two of it's control points(naimly p0 and p3) it only makes the number of bends and shapes the curve can take on b/w these points more.

there are pleanty of other interpolation techniue to such as trignometric interpolatin or radial basis interpolation, etc etc to many to naim

1. 1
2. 2
3. 3
Rutin
18
4. 4
khawk
14
5. 5
frob
12

• 9
• 11
• 11
• 23
• 12
• ### Forum Statistics

• Total Topics
633659
• Total Posts
3013217
×