Do a line and capsule intersect if mininum distance between the two lines is less than the capsule radius

48 Views Asked by At

In $R^3$ space say I have a capsule shape defined by two end points $a$ and $b$ and radius $r$. And a line define by parametric equation $p+tq$. I can also define a line that goes through the capsule end points $a+u(b-a)$

Is it true that the line $p+tq$ and the capsule intersect if the minimum distance between the two lines is less or equal to $r$?

If not how would one calculate if the two shapes intersect?