Interpolation of the values of points on the surface created by convex hull

Viewed 212

I have some 3D points like [x,y,z] and their values like [Bx,By,Bz] . The convex hull of these points are generated by convhull or convexHull

convex hull

Now I want to interpolate the values of triangle vertices for N new points on the convex hull. What are the possible methods to do this?

1 Answers

Suppose a given point is p=(x,y,z) and you have found that it's located in a triangle p1=(x1, y1, z1), p2=(x2, y2, z2), and p3=(x3, y3, z3) (on the convex hull). Now if I understand correctly, we want to compute three non-negative real-valued a, b, and c, such that a * p1 + b * p2 + c * p3 = p and a + b + c = 1 (linear combination of the triangle's vertices). It can be defined by a matrix like M = [p1;p2;p3] with an equation like [a b c] * M = p. Hence, [a b c] = p * inv(M). You can do it for all other points.

Notice that if p is not inside the triangle, the solved [a b c] will not satisfy the non-negativity or a + b + c = 1.

Related