Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/ [2]https://github.com/asadlionpk/SPHjs



It'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).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: