Centeroid Cellzilla2D Home


Finds the centroid of a collection of vertices. The centroid is defined to be the mean of the coordinates. The centroid is not the same as the center of mass unless all of the mass is equally distributed amongst the vertices. To find the center of mass instead of the mean coordinates use the function Centroid instead.


Return Value

Centeroid[{v1,v2, ...}] - returns the centroid of the specified polygon, where the vi are vertices of the polygon. The vertices are assumed to be in order around the edge of the polygon, either clockwise or counter-clockwise.

Centeroid[tissue, n] - returns the centroid cell n.

Centeroid[tissue, {n1,n2,...}] - returns the centroid of cells n1,n2,..

Centeroid[tissue] - returns the centroid of all cells in the tissue.



[ Download Example as Zipped Mathematica Notebook ]

Implementation Notes

See Also


[6 June 2017]