# Homework 2, due Tues Sep 9, 2008, at start of class.

1. Last Friday I mentioned that it seems that a small fraction of people can see in 4 colors. (Most of us see in 3, and colorblinddeficient people in 2 or 1.) Do some research on the web to answer this:
1. Are these tetrachromatic people either sex, or mostly (or all) men, or mostly (or all) women?
2. Why (in 50 words or less)?
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 10, so that each pixel takes only 0.3 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 (5th edition) exercise 1.1 on page 36.
5. Do Angel exercise 1.2 on page 37.