Visualization, Spring'98, Yap

HOMEWORK 1:
ROTATING COLOR CUBES

  1. DUE: February 19.

  2. INTRODUCTION

    In this exercise, we want you to put up a cube inside another cube (somewhat similar to the jello demo). We want to be able to rotate the two cubes independently. You will need to invoke basic GLUT functions for window interface and interactivity.

  3. DETAILS

    -- You must do this in a team of 2 or 3. Here are some instructions for forming teams. -- Check out the jello demo (see programming homepage below) for a model of what we want.
    -- The viewer eyepoint may be fixed by an initial translation (say along the negative z-axis), but the two objects can rotate independently about the origin.
    -- Outer cube: its near faces rendered in GL_LINE mode (so it is transparent) while its far faces are rended in GL_FILL mode. This way, we can see inside this outer cube.
    -- Inner cube: render it the usual way that solids are rendered (hidden surface removal applied, so the far faces are not seen).
    -- There is a light source which you can fix at some convenient spot ``above'' the scene. See glLightf() [Angel, p.239].
    -- Each cube has its own color scheme at each vertex. The shading can switch between smooth and flat.

  4. USER VIEW/INTERFACE

    -- The window must show the following radio buttons:
    • Continuous Spin (on or off)
    • Shading (Smooth or Flat)
    -- NOTE: radio buttons can only be in one of two states (either in or out, on or off). While you can do very artistic buttons, a simple solution like displaying a tick inside a small box will suffice. -- Use glut pop-up menus (see Angel) that offer the following choices: quit, reset cubes. -- Use of mouse for rotation: left button for outer cube and middle button for inner cube.

  5. PROGRAMMING AID

    -- We have set up a general programming homepage in which we try to put in useful information related to programming.

  6. WHAT TO HAND IN

    -- Email the T.A. (and cc to me) the directory in which your solution is found. This directory must be made world readable, of course.
    -- There must be a Makefile, and all we need to do is to say "make" to compile your example. PLEASE MODIFY THE MAKEFILE IN ANGEL'S BOOK EXAMPLES.
    -- There must be a README file containing the following information:
    1. Identifies this as Homework 1 for this course.
    2. Identifies your team members.
    3. Any ``user'' instructions or hints for running your program.
    4. You may tell tell us about any interesting experience you have learned from this homework.

[PREVIOUS HOMEWORK] [NEXT HOMEWORK] [ALL HOMEWORKS] [CLASS PAGE]