CMPS 160 -- Lab Assignment 5
Due date:
Thursday, May 9, 2013, 5pm
Objectives:
Read and display object file.
Description
-
Instead of generating your 3D model (e.g. fractal terrain) on the fly,
most models are actually created, saved, and read back in for later use.
Using the same setup as in your previous labs (i.e. with wireframe and
diffuse shading), read in the woman model from the
data repository and allow user to render in either wireframe or flat shading.
You can assign your choice of material and light colors.
-
Each 3D object is described by two files --
one that specifies the vertices (coor file),
and the other that specifies how the vertices are connected to form
polygons (poly file). Here are their format:
- coor file
line 1: number of vertices.
line 2..n+1: list the x,y,z coordinates of the n points
- poly file
line 1: number of polygons
line 2..n+1: list of vertices for each polygon.
--> first column is just a label for the polygon.
the first and last vertices are connected to form a closed polygon.
-
Do not worry (just yet) if the woman is not centered on your viewport.
Grading:
Note: all lab and programming assignments must include a statically linked executable.
This lab assignment will form part of your CMPS 160L grade.
The other component of CMPS 160L grade is your attendance.
Submission:
Submission must be done using the "submit" command from CATS.
- submit cmps160-ap.s13 lab5 lab5.tar, or
- submit cmps160-ap.s13 lab5 lab5.zip
This command should work from unix.ic.ucsc.edu.
Create and submit a subdirectory called lab5.
It should contain the executable and
all the files you have to make your program compile/run.
Tar or zip up lab5 before submitting.
Last modified
Friday, 03-May-2013 09:25:50 PDT.