Code covered by the BSD License

Highlights from Ray/Triangle Intersection

4.28571

4.3 | 7 ratings Rate this file 28 Downloads (last 30 days) File Size: 13.4 KB File ID: #25058

Ray/Triangle Intersection

Ray/triangle intersection using the algorithm proposed by Möller and Trumbore (1997)

File Information
Description

Ray/triangle intersection using the algorithm proposed by Möller and Trumbore (1997). The zip file includes one example of intersection.

References:
[1] "Real Time Rendering". Third Edition.
Tomas Akenine-Möller, Eric Haines and Naty Hoffman.
A. K. Peters, Ltd. 2008 (Section 16.8)

[2] "Fast, minimum storage ray-triangle intersection".
Tomas Möller and Ben Trumbore.
Journal of Graphics Tools, 2(1):21--28, 1997.

[3] Other algorithms:
http://www.realtimerendering.com/intersections.html

Acknowledgements

This file inspired Ray/Box Intersection, A Fast Voxel Traversal Algorithm For Ray Tracing, and Triangle/Ray Intersection.

MATLAB release MATLAB 7.6 (R2008a)
06 Jun 2013

Thank you! I found this to be very useful! Thanks also to Wouter for the suggestion of using "sum" and an own "cross" function. I can't confirm factor 10, but factor 3 isn't so bad as well!

06 Jun 2012
23 Jun 2011
07 May 2011
16 Oct 2010

Thank you vey much for this useful file.
Btw, could anyone give me a tip how to calculate the direction vector if I have two 3 dimensional nodes?

30 Aug 2010

Excellent, it helped me a lot.
You can speed this function up considerably by not using the Matlab functions cross and dot, these are unnecessarily slow. Make your own cross product function, and use "sum(a.*b)" instead of "dot(a,b), and it'll will be at least a factor 10 faster.

21 Oct 2009