cube.c

Tom Kelliher, CS 320

Apr. 24, 2000

Administrivia

Announcements

Assignment

Read 4.8,9.

From Last Time

Pong lab day.

Outline

  1. Study of cube.c.

Coming Up

Object transformations: transformation concatenations, OpenGL implementation.

cube.c

Assume the x- and y-axes have their usual orientation and that the +z-axis points towards you. The questions (A -- Aaron, R -- Rachel, S -- Sze-Ling):

  1. (R) Draw the cube in 3-dimensional space, labeling (0-7) the vertices.

  2. (S) What are the indices of the vertices making up the front and back (as seen from the +z axis) faces of the cube?

  3. (A) Modify the program so that only the (0,4,7,3) and (1,2,6,5) cube faces are rendered. Run the program with and without depth-buffering enabled. Explain the results.

  4. (R) The edges of the cube don't appear to be parallel. Why?

  5. (S) Explain polygon().

  6. (A) Explain the cube ``data structure.''

Additional questions:

  1. How could the cube data structure be extended to handle arbitrary objects?

  2. Why does the cube's back face rotate in the opposite direction in comparison to the cube's front face?

  3. How do the colors vary? Why do they vary? How is the effect achieved?



Thomas P. Kelliher
Mon Apr 24 08:38:12 EDT 2000
Tom Kelliher