A simple 2D physics engine in Python