Computing centroids points-on-surface and points-on-line