For line segments and , , the squared Euclidean distance is a convex quadratic function on a square. Its minimum is either an admissible stationary point or a minimum on one of the four edges. Each edge minimum is a point-to-segment orthogonal projection, restricted to the interval. Testing these five candidates gives a complete algorithm; when the directions are parallel, the edge candidates suffice. Independently restricting both coordinates of the unconstrained stationary point is generally incorrect because the variables are coupled by .
For segments with initial direction vectors , initial endpoint displacement , and translation velocities , contact is feasibility of the displayed linear equation with and . Minimizing is a small linear programming problem. A nonsingular three-column coefficient matrix gives at most one candidate; singular, parallel and degenerate cases require the constrained feasibility problem rather than division by a vanishing determinant.
The earliest approach within distance is a convex optimization problem with a norm constraint and the same segment and time bounds as contact. An elementary alternative enumerates whether each segment parameter is free or at an endpoint. In each nonsingular active case the free closest-point parameters are affine functions of time, leaving a quadratic distance inequality on a valid time interval. Rank-deficient cases need their null-space constraints retained. Unlike contact, the two segment parameters and time are no longer determined by a vector equality.

Articles by others on the same topic (0)

There are currently no matching articles.