Hi, I have a long-standing issue where I struggle to find a good way to plot fields of spherical functions in VTK-based software, including ParaView.
What I have is:
- A large-ish dataset which consists of (N, M) scalars.
- N (which can be pretty large, 1 million or more) maps to some rectilinear 3D grid (voxels, generally).
- M (which is smallish, say 64 to 512) maps to points or cells on the unit sphere using an arbitrary discretization (I am able to sample any points on the sphere in my data).
So what I want to do is to take a subset of N (say a sample of size 250), and at every point in the grid of that subset, I want to draw a spherical function using a 3D glyph or similar filter. Ideally, I would like to be able to manipulate both the radius and the color of the surface of each function-glyph based on my data, preferably with interpolation.
I’m proficient at Python and I have some experience with VTK, but I haven’t used Paraview itself that much - in the past I used various other VTK derivatives like Mayavi, tvtk, pyVista etc, but I was only ever able to accomplish the above by making a big script to create each spherical function individually, and then rendering them all together, which is really rather inconvenient, and I was hoping there is a way to create “rich glyphs” of the kind I’m describing in ParaView. I have access to tons of computing power including extremely high-end GPU:s, so that’s not a limiting factor.
I can structure my input to ParaView in pretty much any way since I create all my data using Python-based software I’ve written myself, but it’s easiest for me to create plain unstructured point meshes with vertex cells, or tetra/octahedral meshes.
For a rough idea of what I’m after, see fig. 1 on p.4 in this preprint of mine which I made using some very cumbersome and inefficient scripting in Mayavi/tvtk: [2305.07750] Small-angle scattering tensor tomography algorithm for robust reconstruction of complex textures You can imagine the spheres in this figure also having their radius scaled by their color value for what I would like to have the option to do.
Thanks in advance!