Visual motion estimation and tracking of rigid bodies by physical simulation