After cleaning up and optimizing my SPH fluid simulator a bit, I implemented marching cubes to generate a mesh over the particles. It’s not terribly efficient but it does alright, usually running 7-9 fps for 400 particles without any tricks like threading or GPU acceleration. Much of it is based on the marching cubes definitions by Paul Bourke, the site is extremely useful and gives a great explanation of the algorithm.
I used two different methods to calculate the scalar field, one being the classic Metaballs by Blinn, and the other is the Averaged Center method by Zhu and Bridson (2005). The averaged center method is supposed to be smoother, but maybe I didn’t have enough particles for it to be really smooth or the radius was too small.