Dynamic physics engine