
CMSI 371
COMPUTER GRAPHICS
Spring 2008
Assignment 0327
To reinforce some of the “math of space” material that we’ve covered, and also to serve as practice of sorts
for those of you whose projects will have similar elements, we’ll do some math-and-programming work.
Not for Submission
•Read Chapter 4 in Angel, with an emphasis on
Sections 4.1–4.5, for additional information and
background on what we’ve covered so far. We’ll
get to Sections 4.6–4.11 next, so there’s no harm
in reading ahead if you’re interested.
•Appendices B and C are also useful for covering
the pure mathematics in detail.
For Submission
Modify the Battleballs sample program (starter files
have been committed to your repositories under
/homework/cmsi371/battleballs) as follows:
1. Change the battle room from the inside of a
sphere to another volume of your choice
(cube, rectangular prism, cylinder, etc.).
2. Modify both the way the room is drawn and the
way the “battleballs” detect collisions against
and bounce off the room’s walls.
3. Change the shape of the “battleballs” them-
selves, from spheres to some other shape of
your choice. Recommendation: Implement a sim-
ple polygon mesh and represent your battleball
as an instance of this implementation.
4. Modify the bounding spheres used for battle-
ball collision detection so that they visually
make sense for the new battleball shapes.
The vector library source code from Graphics
Gems has been intentionally omitted from your
repositories, so that you can have the experience of
downloading these files yourself and integrating
them into your process. The link to the repository
is available on the course Web site.
Commit your code as a set of new revisions to
/homework/cmsi371/battleballs.