How to find the centroid of a triangle with 3 coordinates