This is a very early version of a second semester project. It is a physics simulation comprising of a deformable cloth object and rigid spheres. At the moment, the user can interact with the surrounding cube by rotating it in two axis, add and remove balls at any time and also record a try and replay it.

The physics are running a basic Euler integrator, with a very small time step though. The tessellation of the cloth is high, 20×30 vertices with one particle (point of mass) per vertex.

The collisions taking place are planes with particles and particles with particles. That being said, I must point out that all rigid bodies are treated as a single particle, while the cloth is, as expected, treated as multi-particle object. Hence a collision with the cloth is actually a collision between all its particles and the ‘other’ object. No optimizations so far.

The whole thing is running in a single thread at the moment and it is VERY CPU consuming, but I intend to apply serious optimizations. Right now I am developing on an Intel T7500, so I have room to spare.

The system is designed, once more, as component-based, although this time a lot better, far more decoupled and much better inter-component communication. The todos though are still many.

As a final product, the simulation will be two things: a multithreaded server and a multithreaded client. The physics for the server and all the clients will run on the server part and must communicate back to the clients with regular network programming!

Source code for the project is available here.

The executable version can be found here. There is no guarantee that is going to work, since it has not been tested in many systems and it does require a fairly new machine to run.

Leave a Reply