有一个云点形状像某种扭曲的抛物面,我想使用Delaunay三角插值点。我已经尝试了其他技术(例如:样条线),但没有设法强制执行所需的行为。
我想知道是否有一种快速的方法来使用scipy.spatial.Delaunay
的结果,在这种方法中,我可以给予(x,y)坐标,并得到单纯形(三角形)上的点的z坐标。从documentation看起来我可以拉出单纯形的索引,但我不确定如何从那里获取它。
有一个云点形状像某种扭曲的抛物面,我想使用Delaunay三角插值点。我已经尝试了其他技术(例如:样条线),但没有设法强制执行所需的行为。
我想知道是否有一种快速的方法来使用scipy.spatial.Delaunay
的结果,在这种方法中,我可以给予(x,y)坐标,并得到单纯形(三角形)上的点的z坐标。从documentation看起来我可以拉出单纯形的索引,但我不确定如何从那里获取它。
2条答案
按热度按时间oug3syen1#
您可以将Delaunay三角剖分与Z值集一起提供给scipy.interpolate.LinearNDInterpolator,它应该可以为您完成这项工作。
如果你真的想自己做插值,你可以从find_simplex和transform构建它。
owfi6suc2#
我们可以使用
scipy.special.Delaunay()
从给定的样本点返回的对象计算重心坐标,并按如下方式插值函数(可以在不使用scipy.interpolate.LinearNDInterpolator
的情况下完成):