In this article: https://www.geometrictools.com/Documentation/IntersectionOfCylinders.pdf

the writer says: "If you plan on using cylinders for bounding volumes in a real-time graphics engine—think twice. A better alternative to a cylinder is a capsule."

Well, I am planning on bounding surfaces with cylinders (actaully I already have). What are the reasonings behind this statement?

Notice - I am mainly interested if two surfaces do not intersect. Some sort of a quick rejection method by bounding the surfaces with solid cylinders.

  • 1
    $\begingroup$ My guess: computational efficiency. It’s faster to compute the intersection with spherical end caps than planar ones. Probably because with planar end caps you need to first work out the intersection and then have a conditional statement of that is inside the radius of the cylinder. With spherical end caps the conditional is not needed: any hit is inside the radius by definition. $\endgroup$ – boyfarrell Apr 8 at 8:57
  • $\begingroup$ @boyfarrell Do you think the difference in performance is something worth looking into? I know you are shooting blind here, but if you could elaborate I would appreciate thate. $\endgroup$ – Eminem Apr 8 at 9:24
  • $\begingroup$ Also, spherical end caps might avoid some edge cases in which the hit is edge on etc. I don’t know how to elaborate, maybe tell me exactly what you are stuck on. $\endgroup$ – boyfarrell Apr 8 at 9:55
  • $\begingroup$ @boyfarrell I'm not stuck. I'm implementing a surfaces intersection quick rejection algorithm. To do this I've bounded the surfaces with a solid cylinders and made a quick rejection algorithm. The article i've provided says that capsules are better, and I though what should I do. $\endgroup$ – Eminem Apr 8 at 11:14
  • $\begingroup$ OK, you could implement both and run timing tests? $\endgroup$ – boyfarrell Apr 8 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.