Loading...

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


Due in class Oct 4 2007

  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,1150) 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. Write a simple interactive OpenGL program to demonstrate affine transformations as follows.
    1. Draw some simple 3D object, perhaps one of the builtin glut ones, like a torus, using the default view.
    2. Transform the object slightly whenever the user types a key, as follows:
      KeyOperation
      aTranslate left by .1
      bTranslate right by .1
      cTranslate down by .1
      dTranslate up by .1
      eTranslate nearer by .1
      fTranslate farther by .1
      gScale in x by 2/3
      hScale in x by 3/2
      iScale in y by 2/3
      jScale in y by 3/2
      kScale in z by 2/3
      lScale in z by 3/2
      mRotate around the x axis by 30o
      nRotate around the x axis by -30o
      oRotate around the y axis by 30o
      pRotate around the y axis by -30o
      qRotate around the z axis by 30o
      rRotate around the z axis by -30o
      With this many cases, I encourage you think of some efficient technique to reduce the number of lines of code you have to write and to make it easier to add or change cases.
    3. Demonstrate your program in the lab on your laptop.