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


Due in class Sep 26 2008

  1. Assume that you have a model coordinate space with corners (100,200) and (1100,2200). You wish to map points in it to a window with corners (0,0) and (1,1). (600,1200) 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.
  2. Here are 2 points: (1,2) and (3,7). What is the vector from the first to the second point?
  3. Here are two parametric lines:
    P = (4,0) + a (1,0)
    Q = (1,3) + b (0,2)
    a and b are parameters. Where do the 2 lines intersect? Give the point and the 2 parameters (a and b).
  4. Here are 3 points on a plane: (0,0,0), (1,1,1), (5,3,2). Give a parametric equation for that plane.
  5. Compute a normal vector to that plane.
  6. Here is a plane equation: P = (2,2,3) + a(0,1,0) + b(1,1,0). a and b are parameters. Here is a line equation: Q = (0,1,2)+c(0,1,1). c is a parameter. Where do the line and the plane intersect? Give the point and the 3 parameter values.
  7. Here are 3 vertices of a 2-D triangle: A(1,0), B(2,1), C(1,3). A parametric equation for points in the triangle ABC is this: P = aA + bB + cC. a, b, and c are parameters. a+b+c=1. a>=0. b>=0. c>=0.
    Find the values of a,b,c for these points:
    1. A
    2. the midpoint of BC
    3. the centroid of ABC
  8. 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. Check the subjects of Priem's US patents, and briefly comment on the distribution of patents by subject.
    2. Pick a graphics-related patent, and summarize it in 100 words or so. Use your words; don't just copy the patent.
    It's possible that I might give Mr Priem copies of your answers to this question (unless you object).
  9. This question is postponed until the next homework.
    Extend the paint program presented in class as follows.
    1. Add 3 more colors of your choosing.
    2. Add a main menu entry and submenu to enable or disable writing with XOR instead of with copy.
    3. Add an entry to the permanent menu on the top to draw a circle; the user selects opposite ends of a diameter.
    4. 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. Modify the program to use a display list, so that the objects are redrawn when you redisplay the window. (This may be surprisingly hard.)
  10. Why does paint.c contain this line:
    y=wh-y;