title: Linear interpolation of three 3D points in 3D space
body: <p>I have three 3D points like <code>p1(x1,y1,z1)</code>, <code>p2(x2,y2,z2)</code>, <code>p3(x3,y3,z3)</code>.
  I have another point, but I know only <code>x</code>, <code>y</code> value of that point like <code>p4(x4,y4,Z)</code>, in which <code>Z</code> is the value I like to compute. </p>
  
  <p>I am sure <code>p4(x4,y4)</code> point is inside a triangle formed by <code>p1(x1,y1)</code>, <code>p2(x2,y2)</code>, <code>p3(x3,y3)</code> by checking with delaunay triangulation approach. How can I compute <code>Z</code> value of point <code>p4</code>? I like to implement it in C programming. Actually I am trying to implement <code>griddata</code> in MATLAB.</p>
  
  <p>Thanks</p>