Test#1: Open-book test.

1.     No collaboration with others online or not during the test.

2.     You can use your own code and/or adapt code from the book, but you are not allowed to borrow code from the internet.

 

1.     Overview of the task: See the sample Windows executable in this zip file modeling a 3D bouncing ball contained in a 3D box, which draws a wire sphere to render the ball. Instead of drawing a wire sphere, implement your own version by drawing a circle (for example, by calling the circle function you have from Lab#1).

2.     Allows a moving camera around the Y axis: You should incorporate the effect of a moving camera like what you did on Lab #3A and #3B so that the user can view the bouncing ball contained from a camera rotating around the Y axis.

3.     Keyboard commands: The user should be able to press keys to (1) stop the camera or keep it moving around its orbit, (2) increase or decrease the radius of the camera’s orbit, (3) increase or decrease the camera rotation speed, (4) stop the ball or keep it moving, (5) turn the gravity effect on or off, (6) set a random speed for the ball, and (7) increase or decrease the current speed of the ball.

 

1.     Allow a bouncing ball: Add a keyboard command 'x' such that when the user presses the key the program will switch from a bouncing circle to a bouncing ball or from a bouncing ball to a bouncing circle.

2.     For this part, you can adapt the icosahedron code from the book as suggested in the practice problem to draw a sphere anywhere you want. Alternatively you can also use glTranslate together with glutWireSphere (or the original code for drawing the icosahedron around the origin) for that purpose if you have a good grasp of glTranslate and the model-view transformation. 

 

·       1st submission: By the end of the class, submit the source code file(s) and your self-evaluation report under Canvas to show what you are able to accomplish in 75 minutes.

·       2nd submission: By 5:00pm Saturday 2/28, submit the final version of the source code file(s) and your self-evaluation report under Canvas to show what you are able to accomplish in the end.