roughed in the computation for sphere intersection