01 How does Centroid (Center of Gravity) work?

In this function, the centroid (center of gravity) is determined from multiple coordinates, outputting the result in the desired format.

Screenshot of centroid (Center of Gravity) tool