python 3d图形控件 可交互_3D / 4D图形Python和wxPython的?

1586010002-jmsa.png

In my day job as a PhD student, I do geological modeling. In my spare time (mainly for fun), I am learning Python and trying to write a simple program to view 3D geocellular models.

The geocellular model is just a 3D grid where every grid cell has some value (as shown in the right figure). So, I would want my viewer to be able to display a 3D grid model like the picture on the right side. As well, I would like it to be able to display cross sections through the model in the x, y and z directions (this is shown in the left figure).

I would also want the models to be able to rotate around all three axes and zoom in and out.

I've done some preliminary investigation (mainly here) and it seems like VisVis and VTK are two potential options. I am trying to use wxPython for the main GUI and it looks like both options will work with wxPython as far as I can tell.

Questions:

Am I right when I say that I think VisVis and VTK would work for what I want? Is one preferable to the other?

Which of these two options would be the easiest to implement?

Is there another option that I also should consider?

Keep in mind that I'm newish to Python and very new to wxPython.

解决方案

What you are looking for is called voxel visualization, voxel grid or such. I would seriously consider MayaVi (never used it, but I keep eye on it), it seems to have something very close here.

Paraview, built atop VTK just like MayaVi, might be a good option, too.

I think going straight to VTK for visualization is difficult, it is too low-level and will probably make you just frustrated. That said, you will want to save your data in as VTK datasets for opening in MayaVi/Paraview; it is not difficult, you just have to pick the right structure (vtkGrid, vtkUnstructedGrid, ...).

你可能感兴趣的:(python,3d图形控件,可交互)