I have three pairs of points in 3D space. These may or may not be coplanar. I want to find a point such that it is equidistant from each pair of points. I know that may or may not be possible depending on the positions of the points. What I want is the best average point, which I can take safely as the centre and draw a sphere from there whose radius is the maximum distance of this point from any of the six points, then I want all the points to remain inside the sphere.