How to derive an average Z value among arbitrarily distributed X, Y, Z points

52 Views Asked by At

I am triangulating using Delauney algorithm to create a 2D (x, y) flat surface in OpenGL. There are "control points" available, with (x,y,z) values that I need to apply to the triangulated surface to derive the z values. The derived z value needs to be "weighted" according how close the "control point" is. Before I start with brute force approach to this - any suggestion on something more elegant would help.