_PointSetBase.center_of_mass#
- _PointSetBase.center_of_mass(scalars_weight: bool = False) NumpyArray[float][source]#
Return the coordinates for the center of mass of the mesh.
- Parameters:
- Returns:
numpy.ndarrayCoordinates for the center of mass.
Examples#
Download Python source code | Download Jupyter notebook
>>> import pyvista as pv
>>> mesh = pv.Sphere(center=(1, 1, 1))
>>> mesh.center_of_mass()
array([1., 1., 1.])