Write me in C++ simple physical engine for simulation of spinning and interactions of rigid bodies.