CPSC 424, Spring 2010
Information About the Second Test

The second and last test will be given in class on Friday, April 23. The test will cover everything that we have done since the first test. This includes material from the notes Section 3.4 to the end, as well as Labs 6 through 10. Of course, to the extent that new material builds on old, you also need to know material from the first part of the course. The format of the test will be as usual, with both essay and programing questions.

Here are some terms and ideas that you should be familiar with:

The idea of OpenGL as a client/server system (who's the client and who's the server)
The Java nio Buffer class and its subclasses IntBuffer, FloatBuffer, and ByteBuffer
Using BufferUtil to create Java nio buffers (e.g., BufferUtil.newFloatBuffer(size))
Buffer methods:  buffer.put(x), buffer.rewind()
How to draw without using glBegin/glEnd and why you might want to.
Using glDrawArrays to draw primitives:
    gl.glVertexPointer(size, type, stride, buffer) [size=2,3,4; stride=0; type=GL.GL_FLOAT]
    gl.glNormalPointer(type, stride, buffer)
    gl.glTexCoordPointer(size, type, stride, buffer)
    gl.EnableClientState(GL.GL_VERTEX_ARRAY)
    gl.EnableClientState(GL.GL_NORMAL_ARRAY)
    gl.EnableClientState(GL.GL_TEXTURE_COORD_ARRAY)
    gl.glDrawArrays(primitive,start,count)  [primitive=GL.GL_TRIANGLE_STRIP,etc]
Vertex Buffer Objects and why they might be used (but not the details of using them)

The projection transformation.
Perspective and orthographic projection.
Near and far clipping planes.
gl.glFrustum(xmin,xmax,ymin,ymax,near,far)  [Where are xmin,xmax,ymin,ymax measured?]
gl.glOrtho(xmin,xmax,ymin,ymxa,near,far)
glu.gluPerspective(fieldOfViewAngle,aspect,near,far)
The viewing transformation.
The effect of a transformation on the viewer is the inverse of its effect on the world.
glu.gluLookAt( eyex,eyey,eyez, refx,refy,refz, upX,upY,ypZ )
Using glRotate and glTranslate directly to set the viewing transformation
How to implement a Viewer node in a scene graph:  using parent pointers;
    how to set up the appropriate viewing transformation (and when to do it).

The three-color theory of color vision, and how it relates to cone cells in the eye.
Color and wavelength.
Primary colors.
Color gamut.
How OpenGL approximates the physical reality of light and vision.
Specular reflection and specular highlights.
Effects of coarse geometry on specular highlights.
Diffuse reflection.
Ambient light.
OpenGL material properties:
   Diffuse color, ambient color, specular color, emission color, shininess.
gl.glMaterialfv(side,prop,value,offset) [side=GL.GL_FRONT_AND_BACK,GL.GL_FRONT,GL.GL_BACK;
    prop=GL.GL_DIFFUSE,GL.GL_EMISSION,etc; value is an array of 4 floats; offset=0]
gl.glMateriali(side, GL.GL_SHININESS, exp)  [exp is an integer in the range 0 t 128]
Two-sided material; gl.glLightModeli(GL.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_TRUE)
Color material;  gl.glEnable(GL.GL_COLOR_MATERIAL)

Lights in OpenGL
Light identifiers, GL.GL_LIGHT0, GL.GL_LIGHT1, ..., GL.GL_LIGHT7
gl.glEnable(GL.GL_LIGHTING)
gl.glEnable(GL.GL_LIGHTn) for n = 0, 1, ..., 7
Setting the colors of a light;
    gl.glLightfv(lightID, propName, value, offset)  [propName=GL.GL_SPECULAR,
        GL.GL_DIFFUSE, GL.GL_AMBIENT;  value is an array of 4 floats; offset=0]
What is the effect of ambient light color?
How light color interacts with material color.
Positional lights.
Directional lights.
Setting the position of a light;
   gl.glLightfv(lightID, GL.GL_POSITION, value, offset)
       [ value=(x,y,z,0) => directional light; value=(x,y,z,1) => positional light ]
The modelview transformation is applied to a light at the time the light's position is set.
The lighting equation;  how it uses:
     emission material color,
     ambient material color,
     global ambient light,
     ambient colors of lights,
     diffuse material color,
     diffuse colors of lights,
     specular material color,
     specular colors of lights,
     material shininess,
     normal vector,
     direction to each light,
     direction of reflected rays.
   
The attribute stack and why you might want to use it.
gl.glPushAttrib(GL.GL_LIGHTING_BIT), gl.glPushAttrib(GL.GL_TEXTURE_BIT), gl.glPopAttrib()
How glPushAttrib and glPopAttrib are used while traversing a scene graph.
How lights can be added to scene graphs.

Textures.
Texture targets:  GL.GL_TEXTURE_1D, GL.GL_TEXTURE_2D.
What is a one-dimensional texture?
Texture coordinates (s,t,r,q).
Texture transformations; gl.glMatrixMode(GL.GL_TEXTURE).
Effect of texture transformations on textures.
Mipmaps and why they are used; minification and magnification filtering.
Texture objects and why they might be used.

Blender animation.
Keyframe animation and IPO curves.
Animating location, rotation, and scaling.
Animated materials.
Path animation.
Animating the camera.
Particle systems:
   Using a mesh as an emitter; halo materials; physics simulation and forces.
The sequencer in Blender:
   Adding scenes, movies, and effects.
   Cross effect; wipe effect; color generator effect.
   
Ray-tracing.
Coloring a pixel by casting a ray from the viewpoint through the pixel.
Intersecting rays with objects in the scene.
How the color of the first point of intersection is computed.
Shadow rays [rays shot towards the light sources].
Reflected ray.
Refracted ray.
Recursive ray-tracing and why it is recursive.