Code covered by the BSD License  

Highlights from
Ray/Triangle Intersection

4.0

4.0 | 5 ratings Rate this file 31 Downloads (last 30 days) File Size: 13.43 KB File ID: #25058
image thumbnail

Ray/Triangle Intersection

by Jesús P. Mena-Chalco

 

18 Aug 2009

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

| Watch this File

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 submission has inspired the following:
Ray/box Intersection, A fast voxel traversal algorithm for ray tracing, Triangle/Ray Intersection
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (5)
21 Oct 2009 Christian  
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.

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?

07 May 2011 Alec  
23 Jun 2011 HARI KRISHNAN  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
ray Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
triangle Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
intersection Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
computer graphics Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
rendering Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
ray tracing Jesús P. Mena-Chalco 18 Aug 2009 10:15:35
rendering Benjamin 12 Apr 2011 04:05:36

Contact us at files@mathworks.com