find centroids working for 1 triangle, multiple triangle case still needs to be done. also the color check on the centroid needs doing.
color check added for single triangle