Added polygon centroid calculation and drawing