Let the oriented vertices be , in an order such that points out of the front face. The given nondegeneracy guarantees . A ray with nonzero direction approaches the front face only if
Reject . This combines back-face culling with rejection of parallel rays, including the coplanar case for this ordinary surface-hit test. The ray-plane intersection parameter is
Reject ; for rays launched from existing surfaces use a positive lower cutoff to avoid counting the launch surface. Form .
Finally determine whether lies inside the triangle. For , , , compute
These solve . The barycentric coordinates are , so the complete acceptance criterion is
The inequalities include the edges and vertices. A renderer sharing edges between triangles should use a consistent numerical edge convention; small floating-point arithmetic errors near a shared boundary should not create cracks. Normalizing is unnecessary for this intersection calculation because its scale cancels.

Articles by others on the same topic (0)

There are currently no matching articles.