Using the centroid of a triangle to find segment lengths