compute_centroid

sknano.core.physics.compute_centroid(coords)[source] [edit on github][source]

Compute the centroid of coordinates.

\[\mathbf{C} = \frac{\sum_{i=1}^{N}m_i\mathbf{r}_i}{\sum_{i=1}^{N}m_i}\]
Returns:C – The position vector of the centroid coordinates.
Return type:Vector