math.triangle.interp

Syntax

f = math.triangle.interp(v1,f1,v2,f3,v3,f3,vIn)

Return interpolated value at vIn based on triangle interpolation. The triangle vectors are 2D vectors with a number associated with each vertex. The interpolated value is based on fractional areas of opposite triangles. The point vIn must fall within the triangle.

Returns:

f - interpolated value

Arguments:

v1 - 2D triangle vertex

f1 - number associated with v1

v2 - 2D triangle vertex

f2 - number associated with v2

v3 - 2D triangle vertex

f3 - number associated with v3

vIn - 2D interpolation point