Proximity time of translating line segments (source code)

= Proximity time of translating line segments
{title2=$\min t:\ \|D+sU-rT+t(V-W)\|\le d$}

The earliest approach within distance $d$ 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.