问题描述
我有一个三维空间(X,Y,Z)与一个额外的参数在每个点(能量),使4个维度数据的总
I have a 3D space (x, y, z) with an additional parameter at each point (energy), giving 4 dimensions of data in total.
我想找到一组X,Y,Z点对应于由已知点之间插值发现了一个异能面上。
I would like to find a set of x, y, z points which correspond to an iso-energy surface found by interpolating between the known points.
的空间网具有恒定的间隔,并完全包围异能量表面,然而,它不占据立方体空间(网格占据大致圆柱形空间)
The spacial mesh has constant spacing and surrounds the iso-energy surface entirely, however, it does not occupy a cubic space (the mesh occupies a roughly cylindrical space)
速度不是关键,我可以离开这个数字捣弄了一会儿。虽然我编码的Python和NumPy的,我可以写的code在FORTRAN部分。我也可以包装现有的C / C ++ / Fortran库中在脚本中使用,如果这样的图书馆存在的。
Speed is not crucial, I can leave this number crunching for a while. Although I'm coding in Python and NumPy, I can write portions of the code in FORTRAN. I can also wrap existing C/C++/FORTRAN libraries for use in the scripts, if such libraries exist.
所有的例子和算法,我至今在网上找到(和数字食谱)停止短的四维数据。
All examples and algorithms that I have so far found online (and in Numerical Recipes) stop short of 4D data.
推荐答案
有相当多的选择在这里...
There are quite a few options here...
为了让您的精力投入到你的网格,你需要使用某种形式的插值。 Shepard的方法是一种常见的,并且相当简单,方法来实现,并趋于工作得很好,如果你的数据分布是合理的。
In order to get your energy into your mesh, you'll need to use some form of interpolation. Shepard's method is a common, and reasonably simple, method to implement, and tends to work well if your data distribution is reasonable.
一旦你有做,你就需要做一些形式的等值面产生。
Once you have that done, you'll need to do some form of isosurface generation.
有一些图书馆在那里,使这个容易。最值得注意的是, VTK 包括Python包装,并拥有所有做这两个步骤所需的工具。
There are some libraries out there to make this easy. Most notably, VTK includes python wrappers and has all of the tools required to do both of these steps.
有关详细信息,如何可以在VTK来完成,你可以检查 vtkShepardMethod 和 vtkContourFilter 。
For details on how this could be done in VTK, you can check vtkShepardMethod and vtkContourFilter.
这篇关于在3D空间内插标量场的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!