Sunday, January 30, 2011

Ray Tracing with Kd-trees

For my undergrad technical project I will be implementing a kd-tree data structure for ray tracers. It is currently the most popular way and effective way of accelerating ray tracing. It is a binary space partitioning tree for k-dimensional space. I will use it for organizing primitives in 3d space. If implemented correctly it should greatly reduce the number of intersection tests required by the ray tracer.




Each node in tree creates an axis-aligned splitting plane, which creates two subspaces which are the left and right children. This process is replicated for each child until we determine when it is appropriate to stop.