I am trying to implement a basic level set program for fluid simulation in C++ and visualize it using SFML, so far I have the following simple program for propagating a circular curve:


However, I am not sure if this the correct way.

Since I am working with a 128×128 grid, the resolution of the grid might not be enough and as a result tracking the curve at phi(x,y) = 0 is not possible in my current code. To deal with that I have tried defining the boundary like |phi(x,y)| < C, but I am not getting a continuous curve all the time unless the C is 0.6-0.9 which would probably be inaccurate. Is there another way to implement Level Set or how can I improve upon this?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.