profile picture

C++ Hydrodynamic Simulator

This C++ hydrodynamic simulator reproduces water behaviours in several contexts as rain, drainage or waves.

Computer simulations are amazing. It’s impressing how they can reveal the mathematical layer that silently hides under the world.

Some time ago I developed a ray tracer in order to simulate the experience of vision and its related effects: shades, illumination, reflections and transparencies.

This time I chose to simulate the water behaviour under different contexts and landscapes. This hydrodynamic simulator implements five different scenarios: rain, flood, drainage, waves and tsunami.

In order to get a real-time application I made some approximations, but still the result is quite realistic as you can see in the video above.

Every time I code a simulator I end up telling myself that computers are damn good in playing the nature role!

If you are interested in how I code it, I share some steps in this blog post.