A simple particle system in c++