4 ms·
I have used alpha threshold trick to achieve metaballs for my fluid simulation[1][2]. I wonder how efficient Marching Squares method is. [1]https://jsexperimen
by asadlionpk 12y ago
I have used alpha threshold trick to achieve metaballs for my fluid simulation[1][2]. I wonder how efficient Marching Squares method is.
[1]https://jsexperiments.herokuapp.com/sph/ https://jsexperiments.herokuapp.com/sph/
[2]https://github.com/asadlionpk/SPHjs https://github.com/asadlionpk/SPHjs
- w0utert 12y agoIt's pretty efficient, O(N), where N is the number of cells (partially) covered by something (which means some pruning of the cells that need to be processed is desirable otherwise you'd have to evaluate all of them for quadratic complexity). The algorithm is also embarassingly parallel, every cell can be processed independently so it scales perfectly with the number of processors available (if you forget about contention effects).