Docsity

Computer Graphics - Homework Problems | CMSI 371, Assignments of Computer Graphics

Toggle sidebar
bg1
CMSI 371
COMPUTER GRAPHICS
Spring 2009
Assignment 0402
Surprise, surprise — for this assignment, you are asked to figure out and implement the rest of the TODO
method stubs in the Java projection program.
Not for Submission
We are still on these readings, and they are worth
re-reading for additional/deeper understanding
(especially in conjunction with doing the home-
work for submission):
• The remainder of Angel Chapter 4
• Angel Appendix C
• Red book Appendices E and F
• And, though you’ve already read this, red book
Chapter 3 is worth reading again now that you
know the theory and mathematics behind the
APIs in that chapter
For Submission
Figure out and implement the gluPerspective and
gluLookAt workalike methods in the Java projection
program (called perspective and lookAt, respectively).
You can test your solutions by using these methods
in the projection program: gluPerspective when setting
up the viewing volume, and gluLookAt when setting
up the “camera” for the scene (see the comments
at the relevant places for some additional informa-
tion; note that, when you have successfully imple-
mented gluLookAt, the modified code won’t look
exactly like what was there before, but should still
be pretty close).
gluPerspective must end with the corresponding call
to glFrustum (frustum in the projection code) — it es-
sentially converts the y-axis field of view, and as-
pect ratio into the corresponding left, top, right,
and bottom boundaries of the viewing volume.
Submit hardcopy showing your mathematics or
geometry for gluPerspective and gluLookAt (including
any relevant diagrams and proofs), and commit
your implementations back to CVS.

Partial preview of the text

Download Computer Graphics - Homework Problems | CMSI 371 and more Assignments Computer Graphics in PDF only on Docsity!

CMSI 371

C O M P U T E R G R A P H I C S

Spring 2009

Assignment 0402

Surprise, surprise — for this assignment, you are asked to figure out and implement the rest of the TODO method stubs in the Java projection program.

Not for Submission

We are still on these readings, and they are worth re-reading for additional/deeper understanding (especially in conjunction with doing the home- work for submission):

  • The remainder of Angel Chapter 4
  • Angel Appendix C
  • Red book Appendices E and F
  • And, though you’ve already read this, red book Chapter 3 is worth reading again now that you know the theory and mathematics behind the APIs in that chapter

For Submission

Figure out and implement the gluPerspective and gluLookAt workalike methods in the Java projection program (called perspective and lookAt , respectively). You can test your solutions by using these methods in the projection program: gluPerspective when setting up the viewing volume, and gluLookAt when setting up the “camera” for the scene (see the comments at the relevant places for some additional informa- tion; note that, when you have successfully imple- mented gluLookAt , the modified code won’t look exactly like what was there before, but should still be pretty close). gluPerspective must end with the corresponding call to glFrustum ( frustum in the projection code) — it es- sentially converts the y -axis field of view, and as- pect ratio into the corresponding left, top, right, and bottom boundaries of the viewing volume. Submit hardcopy showing your mathematics or geometry for gluPerspective and gluLookAt (including any relevant diagrams and proofs), and commit your implementations back to CVS.