mosra / magnum-examples

Examples for the Magnum C++11 graphics engine
https://magnum.graphics/
The Unlicense
282 stars 95 forks source link

Add FluidSimulation2D example #71

Closed ttnghia closed 4 years ago

ttnghia commented 5 years ago

Hi there!

Another magnum example: FluidSimulation2D. This example has a different simulation model (APIC) than the previous FluidSimulation3D example (SPH), and run with just a single thread.

Again, you're free to modify it as you want. I have tried to tightly follow magnum coding convention. You can write a short description for this example as "A 2D fluid simulation using Affine Particle-in-Cell (APIC) method".

image

ttnghia commented 5 years ago

Here is the video for this example: https://vimeo.com/372790124

mosra commented 4 years ago

Merged as f7c060fa72d72381837aa37e9ebfc6ff4be0a61a, thanks a billion and sorry again for the extreme demotivating delay from my side.

Docs online at https://doc.magnum.graphics/magnum/examples-fluidsimulation2d.html, I also managed to do an initial port to Emscripten, but need to tune the perf a bit until I can publish :)