Computer_Science
 Home | People | Curriculum | Projects | Resources | Media

Computer Graphics

CMSC 212

Haverford College

Fall 2003

Lab 2

Wednesday, September 31

Mouse & Keyboard Interaction, and 3D Transformations, with OpenGL

This project extends work from the previous lab assignment, and should not be started until the previous one is completed successfully. In fact, many of the labs build on each other, so proper programming organization and documentation are essential throughout the course. You may want to return to the previous lab and reorganize it so it is simpler to extend.

Design and implement a C++ program using OpenGL calls to permit the user to point to a position in the drawing window and click to draw a shape using the same scheme as before:

Your program should also maintain a list of the shapes drawn in the current "universe." Each entry in the list needs to contain enough information to redraw its corresponding shape at the "proper position and size."

The program should again accept mouse input keyboard input and the mouse input concurrently. Some of the keystrokes have been reassigned in this lab for 3D transformations. The following keyboard characters should be used, with the associated actions:

Please include text instructions for drawing and transformations in the standard text window (i.e., use cout ...)

Obtaining and submitting labs have also been revised. The lab is completed as follows:

  1. Copy the main.cpp file from the previous lab to save it as lab1.cpp, then copy again into login.2.cc, where login is your user login name (e.g., jdougher.2.cc)
  2. Edit login.2.cc to accomplish the goals stated above for this lab (i.e., Lab 2)
  3. Make, run, and test the completed program.
  4. Document your code appropriately (especially including your name in the source).
  5. Submit your work into the cs212 drop box on moe.cs.haverford.edu (still to be established)
Grade Candy: only attempt after completing the requirements

Links for CS212 -- Other CS212 Assignments: 0 1 2 3 4 5 6 7

Haverford College Page maintained by John Dougherty, David Wonnacott, and Rachel Heaton.
Computer Science Department, Haverford College.