Sign in to follow this  
Lode

test if point is inside tetrahedron

Recommended Posts

Lode    1003
say you have a tetrahedron made out of points a, b, c and d. What's a quick way to test if a 3D point p is inside this figure? Thanks. P.S. It's also fine if the sides ab, ac and ad are made infinitely long so that you get an infinitely large tetrahedron.

Share this post


Link to post
Share on other sites
SiCrane    11839
You have four planes defined by the four cominations of three points. Take each plane equation defined by the normals, and if p lies on the side opposite of the normal for each plan then it's inside the tetrahedron.

Share this post


Link to post
Share on other sites
Sneftel    1788
Given your PS, another thing to do would be to convert the point to barycentric coordinates. If any of the last 3 coordinates is negative, the point is outside the infinitely extended tetrahedron. Additionally, if the first coordinate is negative, the point is outside the original tetrahedron.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this