-->

Interpolation with Delaunay Triangulation

2019-04-09 12:38发布

问题:

Having a cloud point shaped like some sort of distorted paraboloid, I would like to use Delaunay Triangulation to interpolate the points. I have tried other techniques (f.ex. splines) but did not manage to enforce the desired behavior.

I was wondering if there's a quick way to use the results of scipy.spatial.Delaunay in a way where I can give the (x,y) coords and get the z-coord of the point on the simplex (triangle). From the documentation looks like I can pull out the index of the simplex but I am not sure how to take it from there.

回答1:

You can give the Delaunay triangulation to scipy.interpolate.LinearNDInterpolator together with the set of Z-values, and it should do the job for you.

If you really want to do the interpolation yourself, you can build it up from find_simplex and transform.