CG Class 18, Mon 2017-10-16

2   Textbook Slides

  1. 4_4 Position Input

  2. 4_5 Picking

  3. 4_6 Geometry

  4. 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.

4   Homogeneous coords ctd

  1. The big topic for Chapter 5 is homogeneous coordinates. They allow all the common transformations - translation, rotation, scaling, projection - to be expressed as a multiplication by a 4x4 matrix.

    My take on homogeneous coordinates.

5   Term project proposals

  1. See the syllabus.
  2. I moved the due date back to next Mon.
  3. This replaces the homework.
  4. Submit on LMS.

6   Research paper for ECSE-6964

  1. If you are registered for the grad version of this class, then in addition to the term project, you must also write a research paper; see the syllabus.
  2. Simultaneously with the term project progress reports, please submit research paper progress reports.