hw7viewing.c provide much of the code needed for Homework 7. All you need to add is code to create a BSP tree for the given scene, and code to draw the scene based on the BSP tree. hw7viewing.c does provide z-buffer-based rendering of scenes. To use hw7viewing.c, compile it and enter hw7viewing test3.txt at a command prompt. A window will appear and you should see a scene with one large polygon serving as the "ground", plus three other polygons appearing to stand on the ground. You can move around the scene in several ways. The controls are quite crude, so go slow or you might zoom out of view (especially when using the mouse controls)! Controls: + increase speed of camera movement - decrease speed of camera 0 (zero) set camera speed to zero (i.e. stop! this key is very helpful) r reset camera to initial position (another very helpful key) w decrease camera pitch (up/down tilt) z increase camera pitch a increase camera heading (turn righ/left) s decrease camera heading e decrease camera roll (tilt left/right) q increase camera roll p print current camer position and orientation to terminal h toggle z-buffering on and off (so you can see what happens without z-buffering - things shouldn't always look correct.) Once you get your BSP stuff added to the code, you should make it possible to switch between rendering 1) with z-buffer 2) without z-buffer and without BSP 3) with BSP but without z-buffer When things are working correctly you should notice no difference between 1 and 3. Mouse control ------------- I also provided some mouse-based camera control. You can change heading and pitch by holding down the mouse in the view window. There's a 25x25 pixel region in the middle of the window (a "dead zone") where mouse control have no effect, but outside this region the general effect is: mouse held down in right side of window: turn right mouse held down in left side of window: turn left mouse held down in bottom portion of window: tilt down mouse held down in top portion of window: tilt up Hoding the mouse down in a corner region of the window has both relevant effects - e.g. mouse held down in upper right region will cause both right turning and upward tilting.