Programming Assignment 3

3-D MODELING IN SPHIGS

Submittal Procedure: (Due Dates: Submittal: Wed. 5/14/97 and Harcopy: Thurs. 5/15/97)

The purpose of this lab is

  1. to study the effects of altering the three parameters (view reference point, view plane normal, and view up) that define the viewing-reference coordinate (VRC) system AND
  2. to study the effects of using parallel and perspective projections.

To this end, you will individually create an applications program which uses the house modelled below:

.gif

I have provided a model of the house and the sphigs program (lab3.c) and a makefile (lab3makefile) in /usr/local/pub/ncs/graphics/lab3/lab3.c. It demonstrates the basic things you will need to know about sphigs. Feel free to experiment with different colors, etc. There are also demo programs available in /home/course/icss570/xlabs/lab3 (lab3.sparc and lab3.sgi). Please note that you will need to copy the appropriate example to your own account in order to run it as SPHIGS programs ALWAYS write an SRGPlogfile. Also note that the output shown is from an earlier specification of this assignment and does not reflect YOUR assignment.

Output Format:

Your graphical output should clearly indicate that you have tried minimally

  1. at least 6 different projection reference points (PRP's) showing varying the projection reference point using parallel (ORTHOGRAPHC) projections. One image should vary X from the default in a positive direction and another in the negative direction. Show similar images for changes in Y and Z from the default setting. Repeat for perspective (PERSPECTIVE) projection. Make sure the dz's you use are big enough to see a difference in the image for PERSPECTIVE.
  2. at least 6 different view reference points (VRP's) showing varying the view reference point using parallel (ORTHOGRAPHC) projections. One image should vary X from the default in a positive direction and another in the negative direction. Show similar images for changes in Y and Z from the default setting. Repeat for perspective (PERSPECTIVE) projection.
  3. at least 6 different view plane normals (VPN's) demonstrating varying the view plane normal using parallel projection. One image should vary X from the default in a positive direction and another in the negative direction. Show similar images for changes in Y and Z from the default setting. Repeat for perspective (PERSPECTIVE) projection.
  4. at least 6 different view ups demonstrating varying the view up (VUP) direction using parallel projection. One image should vary X from the default in a positive direction and another in the negative direction. Show similar images for changes in Y and Z from the default setting. Repeat for perspective (PERSPECTIVE) projection. Be sure to try y < 0.

Since the object of this lab is to study the effects of changing various parameters, it is strongly suggested that you show all views concerning a particular set of changes on a single screen using several viewports. Be sure to label each as to which parameter is being altered and the value that is currently being used. It is useful also to include a default parallel projection (the original house) and a "default" perspective drawing on each screen that varies a parameter utilizing parallel projections and perspective projections, respectively. A template file /usr/local/pub/ncs/graphics/lab3/lab3.c is provided that is already set up this way. A sample makefile is available in the same directory.

Submit a directory called lab3dir. Use the following

submit -v paw-grd lab3 lab3dir

This directory may contain the following files:

READ_ME (optional)
all .c files (required)
any .h files (optional)
makefile (required)

Your makefile should create the executable module lab3.lib by invoking

make lab3

HARDCOPY TO HAND IN - For this lab, you will need to hand in a typed (or word-processed) written description of what effects were observed in altering the various parameters. A template file is available in /usr/local/pub/ncs/graphics/lab3/analysis. Be specific. For example, if "x" is altered, the image is altered "in such a way". Then try to generalize. Use correct graphics terms such as translate, scale, shear, and rotate, not terms like shift and tilt. Also, if the change to the image is one of rotation, specify which axis the rotation is about and in which direction (clockwise or counterclockwise). This description will be HALF of the grade for this lab.

NOTE: If you feel a need to explore these concepts further, please try out URL: http://www.cs.rit.edu/~ncs/tinkerToys/tinkerToys.html using a java enabled web browser such as Netscape 2.02 and later. The "View Control Window" from the "Window" menu will help your exploration.

Let's agree on some common terminology: For example, let's agree that the face with z=-0.2 is the FRONT of the house, the face with x=0.2 is called the LEFT side of the house and the face with x=0.8 is called the RIGHT side of the house.

NOTE: Your program must abide by good programming style, and be fully documented. It would be a good idea to modularize this so that each module demonstrates varying a particular parameter.


May 05, 1997