Contact time of translating line segments (source code)

= Contact time of translating line segments
{title2=$D+sU-rT+t(V-W)=0$}

For segments with initial direction vectors $U,T$, initial endpoint displacement $D$, and translation velocities $V,W$, contact is feasibility of the displayed <linear equation> with $s,r\in[0,1]$ and $t\ge0$. Minimizing $t$ 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>.