使用 Delaunay 三角剖分进行插值 [英] Interpolation with Delaunay Triangulation
问题描述
有一个形状像某种扭曲抛物面的浊点,我想使用 Delaunay 三角剖分来对这些点进行插值.我尝试了其他技术(例如样条曲线),但未能强制执行所需的行为.
我想知道是否有一种快速的方法来使用 scipy.spatial.Delaunay
的结果,我可以给出 (x,y) 坐标并获得 z 坐标点在单纯形(三角形)上.从 连同 Z 值集,它应该为您完成这项工作.
如果您真的想自己进行插值,可以从 find_simplex 和 转换.
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.
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.
这篇关于使用 Delaunay 三角剖分进行插值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!