Text

 


Objectives:  You are expected to learn

  1.   Modeling using OpenGL/GLU/GLUT 3D primitive

  2.   3D transformation and hierarchical transformation

  3. OpenGL 3D camera and projection setup

  4. OpenGL double buffer and depth  buffer




Tasks: 

Write an OpenGL 3D drawing program that includes the following features:


  1. 1.(1 pts)  Set up OpenGL 3D projection and viewing matrices using gluPerspective() and gluLookat(). Position the camera at an adequate position so that you can see the entire scene.


2. (1 pt)  Use OpenGL depth testing feature to display the solid objects in a correct visibility order.
    This is done by calling the following functions:

    glutInitDisplayMode(GLUT_RGB|GLUT_DEPTH) in your main program and

    glEnable(GL_DEPTH_TEST) in the beginning of your display function.  


   Make sure that the near plane parameter in the gluPerspective() call is not zero.


3. (6 pts) Use glut primitives  to construct  a ‘cube’ man  

  1. The man should have the following components: head, neck, torso, arms, and legs with the following hierarchy 

  2.    Torso
            head
            left upper arm
                  left lower arm
                        left hand
            right upper arm
                  right lower arm 
                        right hand
            lower body (below the waist)
                  left thigh (upper leg)
                        left calf (low leg)
                             left foot
                  right thigh (upper leg)
                        right calf (low leg)
                             right foot

  3. Use glutSolidCube with appropriate scaling to construct each component

  4. Place nose, eyes to the face 

  5. Paint the man with colors of your choice

  6. Create a simple environment around the cube man


4. (1 pts) Use key stroke 'w' to toggle between drawing solid and wireframe man. There are two ways you can draw wireframes in OpenGL

  1. Use glutWire*** functions instead of glutSolid*** functions (e.g. glutWireCube()) 

  2. Use  OpenGL's glPolygonMode() function to indicate that a polygon should be drawn as outlined (the default is filled)


5. (5 pts)  Make the  man 'alive' by allowing it to walk forward and backward

  1. Use key 'f' to move forwards; 'b' moves the man backwards; 

  2. make sure that the legs and arms swing properly as the cube man walks.


Below are some sample images for your reference:


 



Submitting Files

What to submit? 

Your program souce files

The Visual Studio solution and project files you use to compile your program.

A simple readme file if you have any instructions about how to compile and use your program.

Do not submit any executable or object files.

In order to submit files for cse581  lab2, use the following command:

submit c581aa lab2 < names of all your files>

(for later labs, replace lab1 by lab2, lab3, etc.)


Important Note about the 'submit' program

The 'submit' program submits all of the files at once,  not  one at a time, previous submissions for a given lab are completely removed.  Or put another way; each time the  submit command is issued for a given lab, ALL of the previously submitted files are clobbered.

That means that

          submit c581aa lab2 lab2.c
          submit c581aa lab2 readme

will result in ONLY 'readme' remaining in the lab1 submission

You should do the following:

          submit c581aa lab2 lab2.c readme
          or
          submit c581aa lab2 lab2_dir

Where 'lab2_dir' is a directory containing all of  the  lab2 files to be submitted, or best of all (for both student and grader) is:

          cd lab2_dir
          submit c581aa lab2 .

Submit will immediately print submission information to  the submitter. Use 'man submit' if you have any other questions.




Late Penalty

You should submit your lab on time. We are on a quarter schedule, which is pretty tight. Being late for one lab could affect the time left for you to complete subsequent labs. All labs are due at 11:59pm of the specified due data, and there is a 10% penalty each day for up to 50%. After that, you get zero.




Grading Criteria

Grading of the labs will be based on the following:

90%: Correctness and adherence to assignment specification.

10%: Readability, structure of code, use of comments, adherence to lab procedures (submitting, naming conventions, etc.)

The grader will grade the labs. If you have problems with the grade you received on your lab, see the grader first. If you can't resolve the dispute with the grader, then see me. However, in order to maintain consistent grading for everyone in the class, I am not very inclined to alter grades that are assigned by the grader.

Don't copy labs. Discussion of lab assignments is allowed and encouraged. However, you need to complete the lab all by yourself. Labs which are too similar will be handed over to the Committee on Academic Misconduct and handled by them.
 

 

CSE 581 Lab 2

Due: 2/7/2011 11:59 pm