implemented computation of centroid

For finding bright spots on sphere and radius and center of sphere etc.