Linear interpolation in 3 points

1.2k Views Asked by At

i know it can be a stupid question , but it put a big question mark ? on me . Do you know if the linear interpolating function can be calculated for 3 points :

$$(x_{0},y_{0}),(x_{1},y_{1}),(x_{2},y_{2}),$$

Since all i know is that through 2 points :

$$P_{1}(x)= y_{0}\frac{x_{1}-x}{x_{1}-x_{0}} + y_{1}\frac{x-x_{0}}{x_{1}-x_{0}}$$

Any help and advice will be apriciated.

1

There are 1 best solutions below

0
On BEST ANSWER

There is no such function unless the three points are colinear (I refuse to spell this word with two l's).

If the three points are colinear and the first two points are distinct, your $P_1$ works. If the three points are colinear and the first two points are the same but not the same as the third point, replace $x_0$ and $y_0$ with $x_2$ and $y_2$, respectively, in your function. If all three points are the same, you can use any linear function that satisfies $P_1(x_0)=y_0$.