minimal sphere intersection working