Homework 2, due Tues Sep 9, 2008, at start of class.
- 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 color
blinddeficient people in 2 or 1.)
Do some research on the web to answer this:
- Are these tetrachromatic people either sex, or mostly
(or all) men, or mostly (or all) women?
- Why (in 50 words or less)?
- 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).
- How many pixels does the movie contain?
- 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?
- How many DVDs, at 4.7x109 bytes each is that?
- If the movie is being streamed as you watch it, how many
bits per second are needed?
- Comment on the numbers I gave you to work with. Are they
reasonable?
- OpenGL programming:
- Go to Nate Robin's excellent opengl site at http://www.xmission.com/~nate/glut.html .
- 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:
- Visual studio.net:
- Copy glut.h to $(VISSTUDIONETDIR\Vc7\PlatformSDK\include\gl
- Copy glut32.lib to $(VISSTUDIONETDIR\`Vc7\PlatformSDK\lib
- Copy glut32.dll to $(WINDOWSS)\system32
- Visual C++:
- Copy glut.h to $(VISSTUDIONETDIR\VC98\include\gl
- Copy glut32.lib to $(VISSTUDIONETDIR\VC98\lib
- Copy glut32.dll to $(WINDOWS)\system32
- SuSE Linux:
- Install the freeglut and freeglut-devel packages.
- Use the -lglut switch when compiling.
- 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.
- Do Angel (5th edition) exercise 1.1 on page 36.
- Do Angel exercise 1.2 on page 37.