# ray-triangle edge intersection

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

## Recommended Posts

How to find out which edge has been intersected by the ray during the ray-triangle intersection procedure if the ray hits an edge. I think one cand etermine if the ray has hit an edge based on the barycentric coordinates - http://upload.wikimedia.org/wikipedia/commons/f/fa/Barycentric_coordi... if any of the 3 barycentric coordinates is 0, then the ray has hit an edge. The question is which edge ? If can make the ray intersect independently against every edge and find the closest intersection but that seems lengthy. Is there a fast check ?

##### Share on other sites
Quote:
 Original post by broli86How to find out which edge has been intersected by the ray during theray-triangle intersection procedure if the ray hits an edge. I thinkone cand etermine if the ray has hit an edge based on the barycentriccoordinates -http://upload.wikimedia.org/wikipedia/commons/f/fa/Barycentric_coordi...if any of the 3 barycentric coordinates is 0, then the ray has hit anedge.The question is which edge ?If can make the ray intersect independently against every edge andfind the closest intersection but that seems lengthy. Is there a fastcheck ?
Setting aside the fact that the ray is unlikely to exactly intersect an edge of the triangle, you should be able to find the intersected edge as follows (note that this assumes the triangle is not degenerate or ill-formed):

1. Find the barycentric weight (if there is one) for which the magnitude of the value is zero or near zero.

2. The edge is formed by the endpoints corresponding to the other two barycentric weights.

1. 1
Rutin
49
2. 2
3. 3
4. 4
5. 5

• 10
• 28
• 20
• 9
• 20
• ### Forum Statistics

• Total Topics
633410
• Total Posts
3011727
• ### Who's Online (See full list)

There are no registered users currently online

×