question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cylinder Convex Hull Tester

See original GitHub issue

Hi,

I’m reading the CylinderConvexHullTester and I’m quite lost in terms of trying to understand the code. Could you give an explanation of how the Test function works? I would really appreciate it. Thanks in advance!

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
RossNordbycommented, Apr 20, 2023

That’s a part of the hull face vs cylinder cap test. Each edge of the convex hull face (projected onto the cylinder’s cap) is tested against the cylinder cap’s bounding circle. Each hull face edge can contribute up to 2 contacts but may sometimes generate only 0 or 1.

Any contacts associated with a face edge are created at the endpoints of a line segment bounded by the original face edge and the circle. That span is represented by an interval from tMin to tMax.

If tMin is 0, that means the previous edge must have extended all the way to the vertex. Since the previous tMax case already created a contact, there’s no value in adding another contact at the current edge’s tMin = 0; the two contacts would be in exactly the same spot. That’s why there’s a tMin > 0 condition.

So the tester would only enter that part when the earliest intersection between the edge segment and the circle is somewhere in the middle of the edge.

1reaction
RossNordbycommented, Apr 12, 2023

It’s more intuitive if you flip it around- clip the line segment against the convex face.

Read more comments on GitHub >

github_iconTop Results From Across the Web

convex hull collision detection - Math and Physics
Hi, I''m trying to do a convex hull - convex hull collision detection algorythm. ... If so OPCODE can do very fast poly...
Read more >
Convex Hull using Graham Scan
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon that contains all the...
Read more >
Convex Hull using Jarvis' Algorithm or Wrapping
Given a set of points in the plane. the convex hull of the set is the smallest convex polygon ... Driver program to...
Read more >
Checking which triangles intersect a convex hull
You can solve the 2D problem in two steps: construct the vertices of the convex hull;. intersect the triangles and the hull, which...
Read more >
Covex hull algorithms in 3D
Given P: set of n points in 3D. Convex hull of P: CH(P), the smallest polyhedron s.t. all elements of P on or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found