Category: Real Time Physics

Multithreaded implementation of a CPU-based fluid simulation system that allows interactive frame rates up to 512×512 grid resolutions in a current (2010) standard PC. The simulation is based on the application of the Navier-Stokes fluid dynamics equations for calculating the evolution of the velocity field over the fluid and other quantities carried by it like the density of suspended particles. An unconditionally stable method is used to solve the equations that allows arbitrarily large time steps in the simulation. Improvements over the original algorithm have been implemented covering the simulation of internal moving boundaries of any shape, application of vorticity confinement forces to recover details lost due to numerical dissipation and parallelization of the most expensive steps of the algorithm. The system was developed using C++ and GLUT/OpenGL. This is my paper explaining the system in detail: Real-Time Interactive Smoke Simulation

Demo of my rigid body system, built on the particle system, that implements the following features:

  • Rigid body state update: position and orientation (using quaternions)
  • Broad phase collision detection with axis aligned bounding boxes using the sweep and prune technique described in I-COLLIDE – An Interactive and Exact Collision Detection System for Large-Scale Enviroments.
  • Narrow phase collision detection with GJK and some optimizations like transformation of one of the bodies to the space of the other or hill climbing of geometry to find supporting vertices
  • Impulse–based collision response using backtracking with the half-step method to find the collision time

The system was implemented with C++, GLUT/OpenGL and the CML math library.

This is a demo of my particle system implementation showing the following features:

  • Global forces: gravity and drag
  • Per object forces: springs and force fields
  • Several integration methods: Euler, Midpoint and Runge-Kutta 4
  • Multiple configurable particle sources: with parameters like direction, cone, emission rate and coefficients of restitution and friction
  • Collision detection and response with planes

The system was implemented with C++, GLUT/OpenGL and the CML math library.