added option to translate center of mass to origin