Interactive Computer Graphics - Assignment 8

Anti-aliasing and Picking


Topics:



  1. Write a program that displays three smooth-shaded triangle-mesh objects using perspective projection. The objects should not overlap and all three should be visible when the program starts up. Each object should have a different surface color. Attach a light source to the camera, i.e. define a static light in camera coordinates.
  2. Allow the user to change the view of the geometric objects, and provide a way for the user to reset the initial view.
  3. The user should be able to click on the geometric objects. When clicked the object's diffuse color should change to some random value.
  4. Allow the user to turn on and off anti-aliasing.

Picking should be implemented by rendering to a frame buffer object with each geometric object having a unique constant color, i.e. with no shading. Once the user clicks the mouse, get the pixel color at the click location and use the color to identify the clicked-on object. Be sure to also draw to the GLUT frame buffer.


Grading Scheme

  1. Displaying three smooth-shaded triangle-mesh objects: 2 points
  2. Changing and resetting camera view: 1 point
  3. Object's color changes when clicked on: 7 points
  4. Turning on/off anti-aliasing: 2 points

Last modified March 1, 2017.