= Assignment 2 Lazy KD-Tree = == Hyun Gu Lee == == Date submitted: 29 Apr 2006 == == Code emailed: 28 Apr 2006 == === Description of implementation approach and comments === I tried (and failed) to do this in several different ways. The only way that was even remotely a success was in the following way: initially, the root node is set to lazy. If a ray hits a lazy node, then it is evaluated as being either a leaf or a interior node. While deciding, go through all the primitivies and fully refine (I realize i should only refine one step, and i tried to make it work but couldn't. As it is, my sorry implementation is calling fullyrefine multiple times...making it exponentially slower!) Then i see whether i should make the node a leaf or a interior. I could only get it work on the second view. === Final Images Rendered with my implementation of heightfield.cpp === '''killeroos-view1.pbrt (Killeroos visible)''' http://graphics.stanford.edu/courses/cs348b-06/Homework2/blank400x400.jpg || || KD Tree || Lazy KD Tree || Ratio || ||build time (secs) || 15.9 || __ || __% || ||total time (secs) || || 12.7 || __% || ||Num of nodes made || 1.376M || __ || __% || || Triangle ray intersections || 673.2k:4692.8k (14.35%) || __ || __%|| "killeroos-view2.pbrt (Killeroos invisible)" killeroos-view2.jpg || || KD Tree || Lazy KD Tree || Ratio || ||build time (secs) || 16.0 || 0 || 0 || ||total time (secs) || 26.3 || 15.2 || .5779% || ||Num of nodes made || 1.376M || 54 || 0.0000392% || || Triangle ray intersections || 758.4k || 758.4k || 100%|| "killeroos-view3.pbrt (close-up)" http://graphics.stanford.edu/courses/cs348b-06/Homework2/blank400x400.jpg || || KD Tree || Lazy KD Tree || Ratio || ||build time (secs) || 16.0 || 0.0 || n/a || ||total time (secs) || 30.4|| 28.5 || .9375 || ||Num of nodes made || 1.376M || 76 || __% || || Triangle ray intersections || 644.1k || __ || __%|| "plants-view1.pbrt" http://graphics.stanford.edu/courses/cs348b-06/Homework2/blank700x400.jpg || || KD Tree || Lazy KD Tree || Ratio || ||build time (secs) || 18.0s || __ || __% || ||total time (secs) || 533.7s || __ || __% || ||Num of nodes made || 7.431M || __ || __% || || Triangle ray intersections || 20.291M:422.458M (4.80%) || __ || __%|| "plants-view2.pbrt" http://graphics.stanford.edu/courses/cs348b-06/Homework2/blank700x400.jpg || || KD Tree || Lazy KD Tree || Ratio || ||build time (secs) || 18.1s || __ || __% || ||total time (secs) || 853.7s || __ || __% || ||Num of nodes made || 7.431M || __ || __% || || Triangle ray intersections || 25.268M:755.006M (3.42%) || __ || __%||