19/1/07, pm-n.
Week: 5 ( 29/1 - 2/2 )
Lectures:
- Plans for the course
- About OpenGL
Exercises:
A visit to the Panorama:
- Wednesday 12:15 - 13:00, 20002229 - 20030596 ( DAIMI )
- Wednesday 13:15 - 14:00, 20031548 - 20060282 ( DAIMI )
- Thursday 12:15 - 13:00, 20020182 - 20053256 ( IMV )
In Stibitz:
Create a new directory and copy the contents of
/users/pmn/public/cgf07/week5
to this new directory.
The directory countains several C programs
and some scripts ( MAKE and RUN ).
The programs are compiled by:
./MAKE <program name>
and executed by:
./RUN <program name>
The programs are:
- double : example 1-3 in "The red book"
- geoF : a cube, a sphere and a pyramid, all flat-shaded
- geoG : as geoF but Gouraud-shaded ( i.e. smooth-shaded )
- surfaceF : a surface formed by two crossing sine-waves (
flat-shaded )
- surfaceG : as surfaceF but Gouraud-shaded
All four programs implement a primitive "grabber". The purpose
of this grabber is to be able to inspect a scene from different
positions and angles. The rotation and translation of the scene
is controled from the key-board as follows:
- x : translate in the x-direction
- y : translate in the y-direction
- z : translate in the z-direction
- X : rotate around the x-axis
- Y : rotate around the y-axis
- Z : rotate around the z-axis
- a : reverse the direction for translation and rotation
- r : reset translation and rotation
Make some simple experiments with one or more of the programs:
- execute a program and look through the source code of the program.
Try to figure out what program statements are responsible for what
visual effects. Make simple changes to the program to convince
yourself.
- add more light sources ( chapter 5 in "The red book" ) to the
scene. Investigate how the material color and the color of light source
combine.
Reading:
- OpenGL, Programming Guide ( "The red book" )
Chapter 1, Introduction to OpenGL