I was wondering if any computational geometrists out there can help me with this one:
I have 2 line segments in R^3, both of which are defined by their end points. I need to find the shortest line segment that joins the two, and where on the two line segments this minimum length segment intersects. If the 2 line segments intersect, then the intersection point should be returned instead, along with a minimum distance of zero.
Is there an established solution to this problem, one that is relatively fast to compute? I've checked through some computational geometry texts, but they only talk about line segments in a plane, or convex polytopes in R^3, neither of which is quite the case here.