Jump to content
• Advertisement

#### Archived

This topic is now archived and is closed to further replies.

# the faster line/triangle intersection

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

If you intended to correct an error in the post then please contact us.

## Recommended Posts

Hi, I need the faster line/triangle intersection algorithm. I found something nice some time ago but now I don''t to know the actual intersection point: just if a intersection happened. I guess that there is an ultra-fast algorithm (faster than simply exclude the last section of the common one) but I did not find it. Could someone help me, please?

#### Share this post

##### Share on other sites
Advertisement
Hi, I need the faster line/triangle intersection algorithm.

Faster than what? What method are you using now?

Pluecker coords are pretty fast, but IIRC they won''t give you 3D coords directly.
You could just do the old-fashioned line-plane intersection test to find the point at which the line intersects the plane of the triangle. Then take the cross product from the point of intersection with all the triangle vertices in same order (i.e. clock-wise or counter-clock-wise) and if the results of the three cross products are all the same sign, then your point of intersection is in the triangle.

http://astronomy.swin.edu.au/~pbourke/geometry/planeline/

#### Share this post

##### Share on other sites
How about this?

http://geometryalgorithms.com/Archive/algorithm_0105/algorithm_0105.htm

I used it in a ray tracer for a school project and it worked pretty quickly.

Kev

#### Share this post

##### Share on other sites
i managed to get one like the one described done in 42 floating point ops if i recall correctly, that did give the point of intersection. it required an extra 4 bytes per triangle over and above just the vertex indices though and was only suitable for static geometry.

#### Share this post

##### Share on other sites

• Advertisement
• Advertisement

• ### Popular Contributors

1. 1
2. 2
3. 3
Rutin
18
4. 4
5. 5
JoeJ
13
• Advertisement

• 14
• 10
• 25
• 9
• 57
• ### Forum Statistics

• Total Topics
632640
• Total Posts
3007617
• ### Who's Online (See full list)

There are no registered users currently online

×

## Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!