[ Home ] [ Syllabus ] [ Schedule ] [ Assignments ] [ Links ]
CS 180 -
All assignments are due by class time (5:00pm) on the due date, unless otherwise specified.
You are encouraged to discuss the assignments in general with other students, as long your work is done separately. As a rule of thumb, at no time should you view the solutions or code of another student. If you find relevant ideas or information on the web, you are free to use them in your assignment, but you must cite the source; otherwise it will be treated as plagiarism. This is also (especially) true if you use code found on the web, even if you modify it extensively.
- Assignment #0 - due Wednesday, October 3
- Read through the course website (especially the syllabus)
- Join the course mailing list at http://lists.cs.ucsb.edu/mailman/listinfo/cs180
- Get the course textbook and complete the first reading assignment (see the Schedule page)
- Send an email to the TA (Domagoj Baričević) with the following information:
- Your name, perm number, email address, home department, and status (e.g., undergraduate, MS student, PhD student, exchange/extension student)
- What related courses you have taken, if any (e.g., image processing, computer vision, HCI, multimedia, etc.)
- Your C/C++ programming experience, from 1 to 10 (1 = no experience, 10 = I dream in C++)
- Your OpenGL programming experience, from 1 to 10 (1 = no experience, 10 = expert)
- What is your strongest programming language (C++, Java, Python, etc.) and what is your preferred development environment (MS Visual Studio, Eclipse, GNU tools, none, etc.)?
- Assignment #1 - due Friday, October 12 by 5:00pm
- A Wavefront OBJ file is a text file that specifies information about a 3D object. You'll have to read the file and the pertinent data. For this assignment, we'll only be concerned with lines that begin with "v " (indicating
a vertex and its x, y, z coordinates in the object's coordinate frame) and with "f " (indicating a polygonal face and the vertices that define the polygon). If there are N vertices specified, the faces will refer to vertices 1 through N.
In the test.obj file, for example, there are six vertices and five faces. Lines in the file that begin with anything other than "v " or "f " should be ignored for this assignment.
- Example OBJ files are available here.
- Some hastily-written code for reading and parsing OBJ files is available: objreader.cpp, objreader.h
- Use glVertex2d (or glVertex2f) to render the wireframe object.
- Please test out the turnin command before Friday, to make sure you are able to access and use it properly. You can submit a test file - later submissions will replace it.
- Assignment #2 - due Friday, October 26 by 5:00pm
- Example OBJ files are available here.
- As mentioned in class, for problem #4, you may do the rotations in either order (about Y then about X, or vice versa). These give different results, but either is fine.
- Assignment #3 - due
Friday, November 9 Monday, November 12 by 5:00pm Tuesday, November 13 by noon
- Example OBJ and ObjectFile files are available here.
- In problem #1, the camera should be at a non-zero height above the ground plane, looking slightly down.
- In problem #2, "numslices" should be a multiple of 4, so the number of objects in the objectlist file should be a multiple of 2.
- In problem #3, draw a horizontal line to separate the two views (top and bottom)
- UPDATE: Typo fixed in Problem 1 - it now says: "The user can also control-left-click the mouse to have the program place the next object in the list in the scene, in the middle of the camera’s view – i.e., at the same distance from the camera as the original object."
- Assignment #4 - due Wednesday, November 21
Assignment #5 - due Friday, December 7
- Solutions to problems 2 and 3 from Assignment #3 will be posted very soon.
- The lights.cpp program from the November 5th discussion session will be *very* useful for this assignment. Step 1 is to understand that program well.
- You need vertex normals for the OBJ models to do the shading, so here are new versions of objreader (objreader2.cpp and objreader2.h) that, after reading the vertices and faces from the OBJ file, compute vertex normals that average the normals of the faces connected to a vertex. (If you use these, make sure to include objreader2.h in your source file - or else rename it to objreader.h.) Note that the code (still) assumes that there are three vertices per face (no more, no less). OBJ models can have more than three - but not the ones we'll use.
- objreader2.cpp was updated with a bug fix (initializing the normals to zero).
- The phong and flag programs are posted on GauchoSpace from the 11/26 discussion session.
- For problem 1, example hullset and queryset files can be found here.