0
$\begingroup$

I have searched through a lot of libraries and sources, that include very diverse intersection algorithms, for computer graphics. And I've never found a capsule-box intersection algorithm. Despite that there are algorithms between capsules and many other shapes. I wonder if it's because a capsule can be represented as a cylinder with two spheres at the end, and is cheaper to calculate than doing a capsule box algorithm? Or does some other algorithm cover it? Or is there any other reason?

$\endgroup$

1 Answer 1

1
$\begingroup$

I am surprised to read that capsule-capsule intersection algorithms are commonly found. This is an arduous problem, with many different cases, and complex high order curves that take quartic equations. Even cylindre-cylindre is daunting.

Caspule-box is easier as it is essentially cutting surfaces with planes, leading to arcs of conics. Anyway, the complete discussion is tedious.

$\endgroup$
2
  • $\begingroup$ From what I've found so far, it seems GJK algorithm need to be used for capsule box intersection $\endgroup$ Commented Aug 3, 2023 at 13:19
  • $\begingroup$ @LennyWhite: ok, this is intersection detection, not computation. In 3D, it amounts to checking the shortest distance between two line segments. GJK can be adapted to the capsule-box case. $\endgroup$
    – user1703
    Commented Aug 3, 2023 at 16:04

Not the answer you're looking for? Browse other questions tagged or ask your own question.