Loading...

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


Homework 2, due Thu Sep 19 at start of class.

   
  1. (This question will take some thinking).
    Imagine that you have an infinitely large room illuminated by one infinitely long row of point lights. This figure shows a side view of the room.
    The lights are h above the floor and are 1 meter from each other. Assume that the ceiling above the lights is black and that no light reflects off of anything.
    An object at distance d from a light gets illuminated with a brightness 1/d2 .
    Each point on the floor is illuminated by all the lights, but more brightly by the closer lights.
    A point p directly below a light will be a little brighter than a point q halfway between two such points. That is the problem --- we want the floor (at least the part directly below the line of lights) to be evenly lit, at least within 1%.
    However, the higher the line of lights, the more evenly the floor will be lit.
    Your question is to tell us what is the minimum value for h so that the line of the floor below the line of lights is evenly lit within 1%.
  2. Imagine that you are creating a movie that is 2 hours long, with 30 frames per second. Each frame is 1000x1500 pixels. Each pixel uses 3 bytes of storage (before compression).
    1. How many pixels does the movie contain?
    2. If you can compress the data by a factor of 30, so that each pixel takes only 0.1 bytes, how much storage will the movie take?
    3. How many DVDs, at 4.7x109 bytes each is that?
    4. If the movie is being streamed as you watch it, how many bits per second are needed?
    5. Comment on the numbers I gave you to work with. Are they reasonable?
  3. OpenGL programming:
    1. Go to Nate Robin's excellent opengl site at http://www.xmission.com/~nate/glut.html .
    2. Install the following on your system if necessary.
      Download http://www.xmission.com/~nate/glut/glut-3.7.6-bin.zip (117 KB), uncompress it , you will find glut.h, glut32.lib and the glut32.dll file, then do one of the following, depending on your environment:
      1. Visual studio.net:
        1. Copy glut.h to $(VISSTUDIONETDIR\Vc7\PlatformSDK\include\gl
        2. Copy glut32.lib to $(VISSTUDIONETDIR\`Vc7\PlatformSDK\lib
        3. Copy glut32.dll to $(WINDOWSS)\system32
      2. Visual C++:
        1. Copy glut.h to $(VISSTUDIONETDIR\VC98\include\gl
        2. Copy glut32.lib to $(VISSTUDIONETDIR\VC98\lib
        3. Copy glut32.dll to $(WINDOWS)\system32
      3. SuSE Linux:
        1. Install the freeglut and freeglut-devel packages.
        2. Use the -lglut switch when compiling.
    3. Download: http://www.xmission.com/~nate/glut/glut-3.7.6-src.zip (4.76 MB), uncompress it, find the "test\glut" directory and choose one of the sample code to verify your installation. I recommend bigtest or shape_test.
  4. Do Angel exercise 1.10 on page 38.
  5. Do Angel exercise 1.11 on page 38.