0
$\begingroup$

Say I have a method of calculating the minimum distance between two finite line segments in three-dimensional space. How might I adapt this method to provide the minimum distance between the surfaces of two hollow tubes of radii $R_1$ & $R_2$ and respective lengths $L_1$ & $L_2$?

At the limit of having long hollow tubes, where the point of closest approach is near their respective mid-points, the simpler line segment to line segment distance suffices. However, how does one handle the case where the tubes fail to have the same slope and the point of closest approach is near one or the other tube's end?

Note - There are no circular 'end-caps' on the tubes referenced in this problem.

  • 0
    @TonyK My intention was to cover the case of long cylinders with the statement: "At the limit of having long hollow tubes, where the point of closest approach is near their respective mid-points...". Good point about the staggered tubes.2012-01-18

2 Answers 2

1

For each tube, its point of closest approach can be on its curved surface, or on one of its two rims -- three possibilities. So there are nine possibilities for the two tubes combined. I think the simplest solution is to try all nine (rejecting curved-surface solutions that are off the end of the tube) and pick the smallest. For this you need three different algorithms:

  1. Closest approach of two infinite cylinders;
  2. Closest approach of two circles in $\mathbb R^3$;
  3. Closest approach of a circle and an infinite cylinder.

As far as I can see, none of these is made easier by knowing the distance between two finite line segments.

Edited to add: I just realised that Algorithm 3 must return all local minima (there may be two of them), in case the global minimum is off the end of the tube.

0

My intuition says to start by evaluating the case where both cylinders have radius 0. This would give you a jumping off point. After that, you'd be able to narrow down some decent neighborhoods by sheer reason. Then, I'd parametrize the surfaces of the cylinders as vector functions in x, y and z. I think -- and this is just intuition here -- that and answer should pop out, if not by logic as I said before, then by using Lagrange multipliers constrained to the neighborhoods you found with 2 vector functions in x, y and z. Just a thought.

  • 0
    I'm saying that if the answer isn't obvious, as it would be in the zero radius case, try writing the cylinders as parametric surfaces. Then write a function describing the distance between those two surfaces. Use you're favorite optimization method to find a min and you're golden.2012-01-18