Closed bdice closed 3 years ago
Here are my thoughts
com
or center_of_mass
and move the existing definition of center
to some more appropriate name. The final thing to do would be to decide which one center
should be an alias for; I would also lean towards center of mass, but I think that should be assessed more carefully.If we correctly calculate the center of mass, it should look similar (as an integral) to the inertia tensor computation. The inertia tensor currently isn't implemented for spheroshapes, meaning that we likely don't have a simple method to compute the center of mass, either. Here is a potential reference for computing these quantities for spheropolygons: https://journals.aps.org/pre/abstract/10.1103/PhysRevE.82.056713
Currently the
polyhedron.center
property appears to be defined as an average of the vertices. However, this does not always coincide with the shape's center of mass: https://bell0bytes.eu/centroid-convex/https://github.com/glotzerlab/coxeter/blob/0b02755cb0cf9550f1ed3a94b5c9eeed21d25830/coxeter/shapes/polyhedron.py#L474-L477
I recommend the following:
center
= center of mass = centroid = barycenter) [1]center
could be retained under another name, but the proper name for this is unclear to me[1] I note that Wikipedia says the center of mass, centroid, and barycenter are synonymous for shapes of uniform density: