In 2D, we have several fairly simple methods to check if a point is inside a triangle. Are there any 3D analogs to these methods, maybe using cross products or something like that?

keenan

@silentQ Sure, I can think of two ways: either project onto a basis for the triangle’s plane and then perform the usual test, or just do a collection of half-space instead of half-plane tests (still using dot products). For tetrahedra you can likewise do half space tests. Finally, even in 2D you could use cross products instead of dot products: compute the barycentric coordinates as ratios of areas (which can be expressed as cross products); if any of these coordinates are outside the range [0,1], the point isn’t in the triangle.

In 2D, we have several fairly simple methods to check if a point is inside a triangle. Are there any 3D analogs to these methods, maybe using cross products or something like that?

@silentQ Sure, I can think of two ways: either project onto a basis for the triangle’s plane and then perform the usual test, or just do a collection of half-space instead of half-plane tests (still using dot products). For tetrahedra you can likewise do half space tests. Finally, even in 2D you could use cross products instead of dot products: compute the barycentric coordinates as ratios of areas (which can be expressed as cross products); if any of these coordinates are outside the range [0,1], the point isn’t in the triangle.