Move center_of_mass to a module-level helper function.
Refactor draw code to draw "frozen" bodies as well as current ones.