Skip to main content

CG Class 8, Mon 2019-09-16

1   No class this Wed

Pres Jackson is holding a faculty reception.

2   Homework due dates changed to Thurs

This is to allow you to get help during the week before handing them in.

This starts with Homework 2.

3   Course wiki reorganized

The landing point lists all the posts in order, newest first. Blog in the top menu does the same. Archive lists the titles of all the posts.

4   Airas office hours

Tues 11am, 1st floor of Folsom library near entrance. akhtaa2@ AT rpi DOT edu.

5   Today's iclicker questions

  1. A mouse reports which type of position?
    1. Absolute
    2. Relative
  2. A tablet reports which type of position?
    1. Absolute
    2. Relative
  3. Which of these can easily be a logical keyboard?
    1. a physical keyboard
    2. a tablet with handwriting recognition
    3. a virtual keyboard on the screen, selecting letters with the mouse
    4. voice input and recognition
    5. all of the above
  4. Which of these mode scales up better when there are many input devices, most of which are quiet most of the time.
    1. event
    2. request
  5. The X window system was designed to
    1. help Mulder and Scully keep track of their data
    2. implement a client-server graphics system for workstations
    3. make smart phone graphics programming easier
    4. be a proprietary hi performance IBM product
    5. succeed the W window system.
  6. Double buffering solves which problem:
    1. producing stereo images
    2. low memory bandwidth
    3. remote debugging PCs
    4. displaying from a frame buffer while it's being updated
    5. optimizing scheduling two elevators as a group

7   Picking

The user selects an object on the display with the mouse. How can we tell which object was selected? This is a little tricky.

E.g., It's not enough to know what line of code was executed to draw that pixel (and even determining that isn't trivial). That line may be in a loop in a subroutine called from several places. We want to know, sort of, the whole current state of the program. Also, if that pixel was drawn several times, we want to know about only the last time that that pixel changed.

Imagine that the image shows cars in the north lot. You select a pixel that's part of the image of a wheel nut. However there are many wheel nuts in the image, perhaps all drawn with the same subroutine. You might want to know that you selected the 4th wheel nut on the right front wheel of the 2nd car on the left of the 3rd row from the front.

There are various messy methods, which are all now deprecated. The new official way is to use the color buffer to code the objects.

  1. Decide what granularity you want for the selection. E.g, in the north lot, you may not care about specific wheel nuts, but just about wheels. You want to know that you selected the right front wheel of the 2nd car on the left of the 3rd row from the front.
  2. Assign each wheel in the lot a different id number.
  3. When drawing the scene, use each wheel's id number for its color.
  4. Look at the contents of the color buffer pixel to know what you picked.
  5. Perhaps really store this info in a 2nd buffer parallel to the color buffer, so the image will look better.

8   Next few lectures will be mostly mathematics

I'm replacing the Angel lecture at Incremental and Quaternion Rotation, with my own material. Feel free to read ahead.