Open ghutchis opened 2 years ago
It would also be nice to push some of this down into core
.. maybe the serial version can be in core
and a QtConcurrent
version can be in the qtgui
implementation that handles threading.
Interesting... The speedup even increases on machines with many cores. I've downloaded the paper by Schroeder et al. to check the algorithm out, hopefully today.
Anyway, I can't help but think how the number of actual polygons is only O(n²) to the grid's resolution. If only we could exploit that... Maybe using some knowledge about the generated surface, like overall connectivity?
There are conceivably some ways to directly generate a mesh for a molecular surface, but considering every paper I've seen uses marching cubes to get the mesh, I think that's the approach to use. (Albeit perhaps with an implementation of FE over MC.)
The code in https://github.com/sandialabs/miniIsosurface/tree/master/flyingEdges/serial seems pretty easy to understand / adapt.
Marching Cubes is indeed a neat algorithm. I hadn't heard of Flying Edges, but I'll save this task in case I have enough time. I do agree that generating the surface directly is off the table... But I've seen optimizations to MC that shave off quite a few empty cubes, so that might help too.
@perminder-17 - here's the issue thread I mentioned...
@perminder-17 - here's the issue thread I mentioned...
Yess, I see. Thanks.
Right now, the mesh generation uses parallel Marching Cubes.
There's a reference implementation of parallel flying edges (outside of VTK) here: https://github.com/sandialabs/miniIsosurface/blob/master/flyingEdges/README.md
Summary paper here: https://www.kennethmoreland.com/documents/miniIsosurface.pdf
The FE implementation was generally 1.5-2x faster than MC even in serial form.