


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Assignment; Professor: Jacobs; Class: Computer Graphics; Subject: Computer Science; University: University of Maryland; Term: Spring 2005;
Typology: Assignments
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Problem Set 2 CMSC 427 Distributed Thursday, February 20, 2005 Due: Tuesday, March 6, 2005
An executable for the finished version of this problem set is available on the class web page. You can obtain code that satisfies the conditions of problem set 1 by sending email to [email protected] (I’d prefer not to post it on the web). You can use this as a starting point, or you can use your own implementation of PS 1 to start. This code, and perhaps yours, handles the somersault. However, in this problem set, you don’t need to worry about getting everything to interact properly with the somersault, in fact, feel free to delete the somersault.
I have added a few features in the executable that you are not required to implement. These include some print statements to indicate speed and intersections, and keyboard functions for ‘d’, ‘e’, ‘r’, and ‘t’. I found these helpful for debugging purposes and you might find similar functions useful.
Note that throughout the problem set you can assume that the rectanguloids in the scene are axial aligned, and do not intersect each other. The car will not usually be axial aligned, however. You can receive extra credit for handling more general rectanguloids in the scene.
By the way, it is certainly possible that my code has bugs. If it does, this does not excuse you if you have the same bugs. If you have any doubts about the program’s desired performance, please ask.
so the direction you move is the direction you look in. Display the outline of the car as a wire-frame (see glPolygonMode ). You can make the car any size you want, but part of the wireframe of it should be visible as you move around (as in the executable).
a. You should have the rectanguloid lie on its side once you are done. Future collisions with the car should be based on its new position. However, you will get partial credit if the rectanguloid goes back to its old position after it falls. b. You do not need to worry about what happens if the rectanguloid intersects other objects as it falls. c. You do not need to worry about the falling rectanguloid intersecting the car, until after it is done falling.
You will receive more credit if you add more features to the system to use in your game. For example:
If you do this part, please include a brief written description documenting your game, so that we can fully appreciate it.
c. Consider the 2D scene:
Here is a possible BSP tree for this scene:
Explain how this BSP tree can be used to choose the order in which we will render these line segments, from the point of view of the viewer shown in the figure. Give the order in which they will be rendered.
d. Construct a BSP tree for this scene in which 2 is at the root.
Viewer