Allow the user to turn either light on or off by clicking on the graphical representation of the light itself (as opposed to clicking on a toggle button). This is an initial exercise which we will use in your next assignment to do direct manipulation on objects.
So far, we have been using orthographic projection. Here you will provide an option for switching between orthographic and perspective projections using a toggle button.
Initially, the lights are both turned on. When the user clicks on the red line segment representing light source 1, it toggles the state of the light source (on/off). Likewise, when the user clicks on the yellow cube representing light source 2, it toggles the state of the 2nd light source. To indicate that a light source has been turned off, redraw the geometry in gray. Also, turn off its contribution to the rendering of the SOR. Note that the red line segment and the yellow cube are not lit. That is, they are not affected by the presence or absence of light sources.
PerspectiveView code from the Matsuda-Lea book.
PickObject code from the Matsuda-Lea book.
Rubric:
You start off with 100 points. You earn additional credit by turning in your assignment early and/or implement additional features. You lose credit for missing functionality, incorrect results, poorly documented or formatted code, or not following instructions. Below is a partial list: up to 10 points off for poor features.html file up to 10 points off for inadequate comments or hard-to-read code up to 10 points off for not following instructions up to 10 points off for special handling functionality points depending on importance Make sure you: a. submit the right files you want us to grade, b. have tested your code on the browsers in the lab. c. follow the general instructions described in overview.html
aashwin: aagrawa6 - victor: drooney - andy: mespirit -
Put materials in a folder named lab3 and zip it up. Submission must be done using the "submit" command from unix.ic.ucsc.edu
Last modified Tuesday, 22-Jan-2019 09:42:16 PST.