问题描述
理论上,线性插值可以使用任何三角剖分(不仅仅是Delaunay三角剖分)完成。
我正在尝试将scipy.interpolate.LinearNDInterpolator
与预先计算的3D三角剖分一起使用,该三角剖分不是scipy.spatial.Delaunay
类。但是,这将不起作用,因为SciPy代码检查三角剖分的类(if isinstance(points,qhull.Delaunay)
...)。我试图通过更改Delaunay对象的'points'和'simplices'属性来创建具有正确类的'假'Delaunay三角剖分,但是我收到了错误AttributeError: can't set attribute
。
有没有办法解决这个问题,或者是另一个用于线性插值的库?
解决方法
看来matplotlib.tri.LinearTriInterpolator
可能是一个不错的选择。经过测试后,我将更新此帖子。
编辑:这不是解决我的问题的方法,因为它仅以二维方式实现。