3D triangle interpolating

Hello
I have the following problem:
Given the three 3d vertices of a triangle and a point x, y, z inside the triangle: What is the fastest way to interpolate (eg edge-point intenities) for the point x,y,z?
Thanks a lot fo any advice!

Hi,

Using barycentric coordinates, every point P in the triangle (p0,p1,p2) can be expressed in the form a0p0 + a1p1 + a2p2 = P, where a(i) > 0 are scalars and a0 + a1 + a2 = 1, p(i) are triangle’s vertices. For example if the vector c(i) expresses the color values at given vertex i, then the combination a0c0 + a1c1 + a2c2 is is the (linear)interpolated color at the point P. This can be applied to other data as well.

Hope this helps
Martin