# Interpolation of vectors with quadratic polynomial

I have following points (-|b-a|,a), (0,b), (|c-b|,c) with a, b and c as two-dimensional vectors. These should be interpolated component-by-component with a second-degree polynomial p.

My problem now is, that I don't know how the polynomial should look like: $p(-|b-a|)= \alpha(-|b-a|)^2 + \beta(-|b-a|)+\gamma = a$

$p(-|b_x - a_x|) = \alpha(-|b_x-a_x|)^2 + \beta(-|b_x-a_x|)+\gamma = a_x$ $p(-|b_y - a_y|) = \alpha(-|b_y-a_y|)^2 + \beta(-|b_y-a_y|)+\gamma = a_y$

$\cdots$

Is my conversion correct?

-

## 1 Answer

No. The polynomial you need is:

$$p(t) = \frac{t(t-|c-b|)}{|b-a|(|b-a|+|c-b|)}a + \frac{(t+|b-a|)(t-|c-b|)}{-|b-a||c-b|} b + \frac{t(t+|b-a|)}{|c-b|(|c-b|+|b-a|)} c.$$

-
Thank you. Could you please explain how do you got this polynomial? –  monoid Jun 8 '12 at 7:41
It is called the Lagrange polynomial. See en.wikipedia.org/wiki/Lagrange_polynomial. In fact, it is two scalar polynomials, one for the x-component and one for the y-component. I just stacked them together for compactness. –  copper.hat Jun 8 '12 at 7:43