CS350
Project 3
Due: March 17
Synopsis
Implement Ray Casting with speed enhancement provided by a KDtree built using
the
Surface Area Heuristic
algorithm as described in class.
Instructions
Use the framework you have from the previous project (the BSPTree).
As you
extract the polygons from the scene, split each into triangles.
(Just form triangles
from vertices 0, 1,2, and 0,1,3,
and 0,1,4, and so on.)
Then these triangles can be
intersected with a ray using geometry library's Ray/Triangle Intersect procedure.
Place all the triangles in a KD tree and use that structure to limit the number of Ray/
Triangle intersections you need to perform.
An interesting statistic you could mention in your report (or on the screen) is the
percentage of the intersection calculations you actually perform.
(Where the total
number possible is #rays * #triangles.)
Notes
●
You can reverse map the pixels to world coordinates with the following
OpenGL calls.
See my web page for online OpenGL reference pages.
glGetDoublev(GL_PROJECTION_MATRIX, .
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 Herron
 Intersection, ray casting, Implement Ray Casting, Surface Area Heuristic, online OpenGL reference

Click to edit the document details