test if point is inside tetrahedron

Started by
1 comment, last by Sneftel 18 years, 6 months ago
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.
Advertisement
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.
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.

This topic is closed to new replies.

Advertisement