Jump to content
  • Advertisement
Sign in to follow this  
_swx_

Determining whether an edge on a mesh is convex or concave

This topic is 3594 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Can anyone suggest a robust way of determining whether an edge on a mesh is convex or concave? An edge is concave if the interior angle between the triangles connected by the edge is > 180 degrees, so any suggestion how to get that (or the exterior angle) would solve the problem.

Share this post


Link to post
Share on other sites
Advertisement
If na and nb are the normals of the both adjacent faces, and pa and pb vertices of the both faces that are not connected to the edge in question, wherein na and pa belongs to the face A, and nb and pb to the face B, then

( pb - pa ) . na <= 0 => ridge edge

as well as

( pb - pa ) . na > 0 => valley edge

where "ridge edge" denotes what you have named convex edge, and "valley edge" denotes what you've named concave edge.

You can avoid numerical inaccuracies in nearly flat connections to be classified if you compute the dot-product of the both normals and compare that with a defined threshold, and do the above decision only of the threshold is exceeded.

Share this post


Link to post
Share on other sites
check if opposite vertex on one of the triangle is back-facing the other triangle's plane.

e.g. triangle A, B, C, and C, B, D are linked by edge BC.

check if A is back facing or front facing the plane of [C, B, D].

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!