CPSC 424, Fall 2017
Information About the First Test

The first test will be given in class on Wednesday, October 4. It covers Chapters 1, 2, and 3 from the textbook. In addition, there might be some questions on the JavaScript material in Appendix Section A.3. There might even be something about basic concepts from Gimp and Inkscape.

Some things not on the test: Hardware concepts (Section 1.1); Java Graphics2D; SVG; writing HTML; working with checkboxes and popup menus in JavaScript; GLUT event handling, such as glutKeyboardFunc(f); programming in C aside from writing basic OpenGL code; setting up JOGL; glDrawArrays and glDrawElements; the linear algebra from Section 3.6.

The format of the test will be the usual: some essay questions and definitions; reading some code and explaining its purpose; writing some code. There will be some geometrical questions that ask you to work with transformations and primitives. I might give you some code and ask you what it draws. I might give you a picture and ask how it could be drawn.

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

computer graphics
painting programs vs. drawing programs (and Gimp vs. Inkscape)

Basic concepts about the elements of 3D Graphics:
    geometric modeling                   lighting and material
    geometric transformations            textures 
    viewing and projection               animation

vector graphics
alpha color component and translucency
aspect ratio
coordinate system
stroking and filling as basic operations in 2D graphics
paths in 2D graphics
bezier curves; control points for bezier curves
2D transformations:  scale, rotate, translate, shear
combining transformations
    (transforms are applied to objects in the opposite of their order in the code)
hierarchical modeling
using subroutines to implement hierarchical modeling
scene graphs
traversing a scene graph
how a stack of transformations is used while traversing a scene graph

3D graphics, and how it differs from 2D
rendering a scene
3D coordinate systems and the z-axis
the standard OpenGL coordinate system
right-handed and left-handed coordinate system
transformations in 3D: scale, rotate, translate
using glPushMatrix/glPopMatrix to implement hierarchical graphics in OpenGL
hidden surface problem
painter's algorithm
the depth test algorithm
the depth buffer, also called the z-buffer
rotation in 3D; the axis of rotation
the right-hand rule for direction of rotation in 3D in a right-handed coordinate system
3D coordinate systems in OpenGL
object coordinates
world coordinates  (no objective existence in OpenGL)
eye coordinates
clip coordinates  (OpenGL default coordinate system, from -1 to 1 in all directions)
device coordinates
modeling transform
viewing transform
the modelview transformation; why modeling and viewing transforms are combined
projection transform
orthographic projection
perspective projection
the view volume, and how it relates to the projection transformation
the depth test requires a finite view volume
matrix mode in OpenGL (glMatrixMode())
the idea of a "camera"
IFS (Indexed Face Set)
front and back faces of a polygon

the OpenGL primitives:
    GL_POINTS                   GL_TRIANGLES
    GL_LINES                    GL_TRIANGLE_FAN

OpenGL 1.0 functions that you should understand and be able to use:
    glBegin(primitive)  and  glEnd()
    glVertex3f(x,y,z), glVertex2f(x,y)  // Also, the "d" versions of functions
    glRotatef(angle, axisX, axisY, axisZ)  // angle in degrees
    glMatrixMode(GL_PROJECTION) and glMatrixMode(GL_MODELVIEW)
GLUT and GLU functions that you should understand and be able to use
    gluPerspective(fova, aspect, near, far)
    gluLookAt( eyex,eyey,eyez, refx,refy,refz, upx,upy,upz )
Basic JavaScript programming:
    variables are untyped
    using  var  to declare variables
    writing functions using the syntax:  function name(params) { ... }
    JavaScript arrays
    JavaScript objects
    things that are essentially like Java (assignment, if, for, while, try)

HTML canvas graphics:
    the properties graphics.lineWidth, graphics.fillStyle, and graphics.strokeStyle
    graphics.scale(a,b);                  graphics.beginPath();
    graphics.rotate(angle);               graphics.moveTo(x,y);     
    graphics.translate(dx,dy);            graphics.lineTo(x,y);   
    graphics.save();                      graphics.arc(x,y,radius,startAngle,endAngle);    
    graphics.restore();                   graphics.bezierCurveTo(cx1,cy1,cx2,cy2,x,y); 
    graphics.fillRect(x,y,w,h);           graphics.stroke();         
    graphics.strokeRect(x,y,w,h);         graphics.fill();