Billinear Interpolation of 3 points I have three points $ (2,2)$ ,  $(1,0)$  and $ (4,0) $
With the values $0$, $0.5$ and $1$
Now with the help of billinear interpolation, my task is to calculate the value for the point at $(2,1)$
I dont know if i did it the right way. But first of all i calculated the distance between the points of the triangle and the point, wich value i want to have. And multiplied them by their values:
$$ \sqrt{(2-2)²+(2-1)²}*0 + \sqrt{(2-1)²+(0-1)²}*0.5+\sqrt{(2-4)²+(1-0)²}*1 =2.943$$
Next i divided this sum through the value of all distances:
$$1+\sqrt{2}+\sqrt{5}= 4.65028$$
$$2.943/4.65028=0.632866$$
No my question is: Is the result correct and did i use the right formula? Thanks
 A: Since you are seeking a function $f=f(x,y)$ with three prescribed values, then an interpolating function for this three data will determine an unique plane in 3-space.
Planes as a graphic of a functions are of the form
$$f(x,y)=Ax+By+C. \qquad(1)$$
In another hand functions like
$$f(x,y)=Ax^2+Bxy+Cy^2+Dx+Ey+F,\qquad (2)$$
are the result of developing quadratic maps of the form 
$$v\mapsto v^{\top}Qv\quad \mbox{or}\quad v\mapsto v^{\top}Qv+K,\qquad(3)$$
where $v=(x,y)$, $Q$ is a two-by-two matrix and $K$ a constant.
Now, meanwhile a value $f(2,1)$ is not given, then it is impossible to determine an unique function of the types in $(3)$.
So, we are bounded to use type $(1)$.  Your conditions can be written as
$$\begin{aligned}
0.5&=f(1,0)=A+C,\\
1&=f(4,0)=4A+C\\
0&=f(2,2)=2A+2B+C\;,
\end{aligned}$$
Which can easily be solved and then one can establish the value for $f(2,1)$ that you are searching.  
Remark: Sid was in the right track but failed to say the form of $f$.
A: If you have $3$ points, it's better to use barycentric coordinates. Basically you can express any point $(x, y)$ on or inside a triangle $(x_0, y_0)$, $(x_1,y_1)$ and $(x_2,y_2)$ as:
$$
(x, y) = (1 - u - v )(x_0,y_0) + u(x_1,y_1) + v(x_2,y_2)
$$
where $u,v \in \left[0,1\right]$ and $u + v \leq 1$. With this scheme, the interpolation is guaranteed to be linear.
