Centroid of a triangle with vertices(x1,y1);(x2,y2) and (x3,y3) is calculated by the formula (x1+x2+x33,y1+y2+y33)