For the course 2IMV15 Simulation in Computer Graphics, I built a fully fledged particle physics engine. Later on, we upgraded the engine to support rigid bodies (particles with a body rather than a single point) and also created a fluid simulation. We managed to combine the two engines such that particles, rigid bodies, and fluids could interact with each other. Instead of implementing this in C++, me and my partner stubbornly decided to put our skills to the test and build all of this in JavaScript. We managed to do so and even outperformed most of the C++ competitors, what resulted in a 10/10 grade for the course.

Video

Below you can see a video demonstrating the features of the engine.

Below you can try out the projects for yourself. Project 1 contains the particle engine with cloth, hair and SPH simulation, whereas Project 2 contains the fluid simulation and one and two-way coupled rigid body interactions.

Note: the demos work best when using a Chrome (or Chromium) browser.

Project 1: Particles Project 2: Fluids