centroid function

Centroid