CS 381  >  Final Exam Information & Week 13 Review Problems

CS 381, Fall 2003
Final Exam Information & Week 13 Review Problems

Final Exam Information

The final exam will be given in the classroom from 1–3 p.m. on Wednesday, December 17, and will be worth 100 points. It will be comprehensive, but will emphasize the material covered after Test 2.

Referring to books or other students during the test will not be permitted. Very limited use notes will be allowed during the test. See the “Cheat Sheet” section below.

The assignments, being oriented primarily toward programming, should not be considered a complete preparation for the test. Readings and review problems have been posted each week, as have lecture slides. You can expect the test to contain problems similar to the various review problems. Here are links to the other review-problem sets:

Week 13 review problems are given below. Answers are in the Answers section, below. Do not turn these in.

“Cheat Sheet”

Students will be allowed to bring one page of handwritten notes (a “cheat sheet”) to the final exam. Notes brought to the final must conform to the following guidelines, which will be ruthlessly enforced.
  1. You may bring no more than one sheet of notes; both the front and the back may be used.
  2. Notes must be on paper no larger than standard notebook paper (U.S. letter [8.5" x 11"], U.S. Legal [8.5" x 14"], or ISO A4 [210 mm x 297 mm])
  3. Notes must be handwritten. The following are prohibited: photocopies (including photocopies of handwriting), computer-printed pages, pages from books, typewritten notes, photographs.

Problems

  1. Explain OpenGL’s texture-wrapping parameters.
     
  2. Explain OpenGL’s texture “mag filter” and “min filter” parameters.
     
  3. Explain the difference between OpenGL’s “replace” and “modulate” texture environment modes.
     
  4. In OpenGL, we can use the same array to hold several textures. Explain.
     
  5. Suppose you are writing a program that uses texturing. You have spent a good deal of effort initializing the texture, setting up all the parameters, etc. Now you want to draw something that is not textured. “Alas!” you cry in dispair, “now I have to undo all my work!” But it is really much easier than that. What should you do?
     
  6. What is “procedural texture”?
     
  7. What (roughly speaking) is “Perlin noise”, and how is it used to generate procedural texture?
     
  8. a. What is “1/f noise”? b. Why is 1/f noise useful in simulating the real world? c. How can we fake 1/f noise using Perlin’s techniques?
     
  9. Briefly explain Perlin’s technique for producing cloudy-looking textures.
     
  10. What simple (“quick & dirty”) method for texure generation involves string arrays?
     

Answers

  1. The texture-wrapping parameter determines what happens when texture coordinates outside of [0,1} are specified.
  2. Ideally, each fragment in a textured polygon corresponds to a single texel. In reality, this is rarely the case. The mag and min filters determine what happens when this correspondence is not exact. The mag filter determines what happens when the texels are too big, and a single texel corresponds to more than one fragment. The min filter determines what happens when the texels are too small, and a single fragment corresponds to more than one texel. Two useful values for these parameters: These parameters can also be assigned other values. See the doc’s if you are interested.
  3. We read a texture from an array using glTexImage2D (or glTexImage1D or glTexImage3D). This is the only time the array is used by OpenGL. Thus, when initializing some other texture, we may use the same array to hold the other texture’s image.
  4. To draw a non-textured object in a program that includes texturing, simply disable texturing when drawing objects that are non textured.
  5. Procedural texture is texture images generated from scratch, algorithmically.
  6. Perlin noise refers to a noise function developed by Ken Perlin. All the variations in this function are at roughly the same scale (both in frequency and in amplitude). The function is easy (fast) to generate and convenient to use. To generate procedural texture, we can add various scaled copies of Perlin noise to make a more complex noise function, and then map the resulting values to colors to obtain an image suitable for use as a texture.
    1. 1/f-noise is noise in which every frequency is present, at an amplitude inversely proportional to the frequency.
    2. 1/f noise simulates the real world well, since in the real world, amplitudes are often roughtly inversely proportional to frequencies (hills twice as wide as also twice as tall).
    3. We make fake 1/f noise by adding repeated copies of Perlin’s noise function, each at twice the frequency and half the amplitude of the one before it.
  7. Perlin’s cloudy-looking textures are generated using “noise with cusps”. This is generated just like his fake 1/f noise, except that the various Perlin-noise functions are each sent through an absolute-value function before being summed.
  8. To generate a “quick & dirty” texture, set up a string array holding the picture you want, make out of characters. Then map characters to colors to create an image.


CS 381, Fall 2003: Final Exam Information & Week 13 Review Problems / Last update: 16 Dec 2002 / Glenn G. Chappell / ffggc@uaf.edu