I have N lines in R^3 (that are very likely skew). I'm looking for an efficient method of computing the radius (and position) of the smallest sphere that intersects every line.


I suspect that there's a solution related to the 'smallest sphere enclosing points' problem, but I failed to find it.


(The purpose is to be able to do bundle adjustment without needing to make the inferred point positions visible to the optimizer).



Smallest sphere intersecting lines in R^3
The distance from a point to a line is a convex function, and the maximum of convex functions in convex, so locating a point that minimizes the maximum of its distances to the lines is a convex problem, therefore it should be relatively easy to solve using modern software for convex optimization.


