calculate bounding sphere