Code covered by the BSD License  

Highlights from
Ray/Triangle Intersection


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

Ray/Triangle Intersection



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

| Watch this File

File Information

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

[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:


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

MATLAB release MATLAB 7.6 (R2008a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
06 Jun 2013 Alexander

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 zf  
23 Jun 2011 HARI KRISHNAN  
07 May 2011 Alec  
16 Oct 2010 Sunghun Jung

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 Wouter

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 Christian  

Contact us