Visualization, Spring'98, Yap

HOMEWORK 2:
TEXTURES

  1. DUE: February 19.

  2. INTRODUCTION

    In this exercise, we learn to use simple texture maps, including the technique of automatic generation of texture coordinates and contouring.
    We will build upon the program in hw1.
    REFERENCE: Chapter 9 of [Guide]. Especially the section on automatic texture-coordinate generation.

  3. DETAILS

    Recall the details from homework 1 with 2 rotating cubes. We want to produce three kinds of textures.
    (A) First, we want you to write the names of the coordinate semi-axes (+X, -X, +Y, -Y, +Z, -Z) onto the respective faces of the outer cube.
    (B) Next, we want you to generate 2-dimensional textures. These are to be mapped onto the faces of the outer cube. They are to be blended in (GL_BLEND mode), so that the names of the semi-axes (+X, -X, etc) from part (A) can be seen.
    -- Recall the near faces of this cube is rended in GL_LINE mode and so the textures do not have any effect on these.
    (C) Next, we want to create contour lines on the surface of the innner cube. Each contour line corresponds to a fixed z-value (in the eye-coordinate system).
    (D) This is done using a 1-dimensional texture map with only one color component (this is called ``luminance'' component).
    -- For instance, this texture map can be a linear array whose values are multiple copies of the following sequence: (1.0, 0.5, 0.5,..., 0.5) The TEXTURE_ENV_MODE should be GL_MODULATE.
    (D) We also want you to produce a wood finish for the inner cube, using the discussion in our lectures as the basis.
    (F) Finally, we want to put up a second viewport to simultaneously observe the rotating cubes from another direction, say in the X-direction. Recall that until now, we have been using the default (-Z)-direction. [It would be nice if you could allow the user to use the mouse to pick this viewing direction.]

  4. USER VIEW/INTERFACE

    This looks much like hw1. Now, we have a new menu item which allows us to toggle between the two kinds of textures for the inner cube: wood finish or contour lines.

  5. HOW TO HAND IN YOUR HOMEWORK

    See hw1.

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