first raw implementation of a point set
centroid