W Randolph Franklin home page
... (old version)
ComputerGraphicsFall2009/ home page Login

Homework 4, Due in class (or email to TA) Oct 2

  1. Extend the paint program presented in class as follows. Hand in the code and screendump(s) showing the new functionality. Document anything that is unclear.
    1. (10 points) Add 3 more colors of your choosing.
    2. (10) Add a main menu entry and submenu to enable or disable writing with XOR instead of with copy.
    3. (10) Add an entry to the permanent menu on the top to draw a circle; the user selects opposite ends of a diameter.
    4. (10) Modify the program to keep drawing primitives until you select something else from the top menu. That is, after you click on line, each pair of future clicks causes another line. (Now the program ignores left clicks after the first 2 until you again select something on the top menu.)
    5. (20) Modify the program to use a display list, so that the objects are redrawn when you redisplay the window. (This may be surprisingly hard.)
  2. (5) Why does paint.c contain this line:
  3. (15) Assume that you have a model coordinate space with corners (-1000,-1000) and (1000,2000). You wish to map points in it to a window with corners (0,0) and (1,1). (0,500) should map to (0.5,0.5). X and Y should scale the same. Compute what the transformations for X and Y should be, in this form:
    X' = s X + dx
    Y' = s Y + dy
    I.e., tell me what s, dx, and dy are.
  4. Curtis Priem is an RPI grad who founded NVIDIA and who is now on RPI's Board of Trustees. He has been a generous benefactor of RPI. He has about 200 patents worldwide.
    1. (10) Check the subjects of Priem's US patents, and briefly comment on the distribution of patents by subject.
    2. (10) Pick a graphics-related patent, and summarize it in 100 words or so. Use your words; don't just copy the patent.