CPSC 589/689 - Modeling for Computer Graphics
TA Page - Fall 2007
| Instructor: | F. Samavati |
| Homepage: | CPSC 589 |
| TA: | Luke Olsen |
| Email: |
|
| Lab time: | MW @ 11am in MS239 |
Submission Procedure
Each assignment will consist of a written portion and a programming portion.
- Written
- Hand in a hard-copy to the drop box on the 2nd floor of Math-Science. If your write-up was done electronically, you can alternatively submit via email.
- The written portion will be collected at 2:00pm on the due date. If submitting electronically, it must be sent by the same time.
- Programming Submission via email must include:
- An archive containing source code, a makefile/project file (if applicable), an executable file (no intermediate files, eg. objects), and a README file.
- A screenshot of the program.
- You must use OpenGL for the rendering component of your application.
- The README should contain instructions for using your program, the target operating system, and details about where the code organization (eg. where is the GL draw function? where is your curve class defined?)
- Due at 11:59pm on the due date.
- You will also be required to demo your program to me in the lab.
- Ensure that the course and assignment number appear in your email subject, eg.
CPSC 589 Assignment N submission - Please include your name and ID number in all submissions (paper and electronic).
- Assignments must be done individually. Instances of copied or inexplicably similar assignments will result in a grade of zero on the assignment portion of the course.
Exercises
Resources
- OpenGL Basics
- The graphics pipeline
- NeHe Tutorials (left-side navigation)
- The Red Book (GL programming reference)
- The Blue Book (GL function reference)
- GLUT reference
- Qt 3.2 Documentation
- Maya Basics (local copy)
- Maya Tutorials (local copy)
- Maya API Guide (local copy)
- Maya API Class List (local copy)
News
Project extension
Click title to readThe project deadline has been extended to Monday, Dec. 17. You should submit your package (CD with appropriate contents) to Dr. Samavati's office. Slip it under the door if no one is there.
Final Exam review session
Click title to readThere will be a final review session during the regular lab time (11am) on Monday, Dec. 10, in the regular lab (MS239). I will go over solutions to the sample questions, and be available afterwards to answer any other questions you may have.
If this time doesn't work for you, please send me an email and if there is enough demand, I will move it to a different time.
Bonus Assignment
Click title to readThe bonus assignment has been released, and can be completed for bonus marks of up to 2% of your final mark.
To assist those interested in doing this assignment, I offer the following tips and suggestions:
- Qt provides two main image classes:
QImageandQPixmap.QImageprovides the image-loading interface, and is optimized for I/O and pixel access/manipulation. Supported formats vary depending on the Qt configuration, but the machines in the graphics lab claim to support the popular formats: JPEG, GIF, BMP, PPM, etc.QPixmapis optimized for drawing.
- Neither of these classes inherits from
QWidget, meaning that neither can simply be instantiated and directly added to a GUI. You need to do some more work for that, but not much. Linked below is a class stub that inherits fromQWidgetand can be added to a window layout much like theRendererclass in the barebones application. - There is an example on the Qt site about creating an image viewer program:
http://doc.trolltech.com/4.2/widgets-imageviewer.html
It takes a different approach than theImgWidgetclass posted above, as it uses aQLabelto display the image. It has some desirable behaviour such as creating scroll bars for images that are too big, but requires some modification as it is done in Qt 4.2. - To subdivide an RGB image, you should apply the subdivision mask to each color channel independently.
Data structure paper
Click title to readLinked below is a paper by Kettner that nicely describes data structures for polyhedral surfaces, including half-edge and quad-edge structures.
Missed demos + Point/Matrix library
Click title to readIf you didn't demo your program to me today, please come to the lab on Wednesday and do it then.
Last week I mentioned that I would post a library for points and matrices. While it is a little late for Assignment 2, you may still find it useful for something, so here it is:
The code should be pretty self-explanatory, at least as much as code can be. The interface for each class is defined in the header files; to use a class, just include the header file in your code, and link to the object file during compilation. If you have any questions on how to use it, let me know.
Lab notes for Oct. 29/31
Click title to readIn Monday's lab, I talked about subdivision curves -- how to interpret the mask values as columns of the subdivision matrix, and how to use the rows of the matrix to implement linear-time subdivision.
In Wednesday's lab, we looked at how to analyze subdivision schemes, to determine properties like continuity and convergence. Analysis is based on eigen-analysis of a local subdivision matrix.
In the next lab (Monday, Nov. 5), we will be doing demos of the Assignment 2 programs. Let's just use the same order as last time, although I should note that each demo will probably take less than 5 minutes, so please come early. See you Monday!
Lab notes for Oct. 24
Click title to readIn today's lab, we showed that a Coon's surface interpolates its boundary curves. We then looked at how to implement a simple surface type -- ruled surfaces -- including how to compute and render it. Finally, I talked about various methods for using mouse events to manipulate an object/camera, including moving the camera on a sphere, and trackball rotation with quaternions.
Protip: In your dealings with B-splines, particularly the de Boor recursion, you may encounter a denominator of zero. In tough times like that, I always find comfort in the notes, especially the third paragraph of page 32. ;)
Oct. 22 lab
Click title to readIn today's lab I returned the first assignment and gave some general feedback. Overall the assignments were very good (see the average mark), but a lack of showing work lead to some lost marks. If you don't show your work and make a mistake, I can't award partial marks.
We then covered a couple of sample questions, on B-splines and NURBS. For NURBS, I showed that they are invariant under projection, provided the weights are adjusted.
Assignment 1 grades
Click title to readThe marks from Assignment 1 have been posted. If your mark is missing, don't worry. I will add it on Monday morning once I get to the university. I'll return the written part in Monday's lab.
Oct. 17 lab
Click title to readIn today's lab I covered some later course topics in a very high-level and sketchy way, just to give a taste of them before the project proposal deadline.
We then traced through an iteration of the B-spline algorithm to see what is happening geometrically. This is relevant to the second assignment programming portion. If you're unclear about the specifications, let me know.
Demo schedule
Click title to readIn tomorrow's lab we will be doing demos of the Assignment 1 helix programs. Each demo session will be approx 5 minutes, according to the following schedule. Armed with this knowledge, you can just show up around your demo time.
| 11:00 | Thomas Shaskin |
| 11:05 | Beverly Rogers |
| 11:10 | Patrick Latter |
| 11:15 | Austin Wang |
| 11:20 | Shannon Halbert |
| 11:25 | Yanina Zholudz |
| 11:30 | Andrew Baker |
| 11:35 | Marc Stiver |
| 11:40 | Kevin Jackson |
| 11:45 | Andrew Elford |
Grad students: If you are available, please come and demo your program at the end of lab (11:50am). Otherwise, send me an email and we can set another time.
No labs Oct. 8-12
Click title to readThere will be no labs next week, as Monday is a holiday and Wednesday I will be attending a conference. If you have any questions in the interim, please send me an email and I'll try to reply quickly.
Have a nice week off, and get ready for demos when labs resume on the 15th.
Lab notes for Oct. 01
Click title to readIn today's lab I covered some proofs and proof sketches related to parametric curves (Bezier and B-spline). You should expect proof-type questions on exams.
Remember that Assignment 1 is due on Friday. The deadline for the written part has been changed to 2pm, so just ensure you hand it in before going to class. The coding part is still due at midnight.
Demos will be on Oct. 15 -- demo schedule TBA.
Lab notes for Sept. 24
Click title to readIn today's lab, we talked about the first assignment -- tips, expectations, etc. I also covered a sample question about the tangent of a Bezier curve at the beginning and end, and the implications of the results on modeling with several Bezier curves/patches.
I have been told that a patch was applied to the lab machines to fix the problem with Maya, so hopefully we can get into that a bit next lab. If you have a chance, launch Maya and go to Help -> Tutorials and do the tutorial on NURBS modeling (in the "Getting Started with Maya" folder). If you're having trouble with the tutorial, take a look at earlier tutorials like "Maya basics" to get a feel for the interface.
Lab Access
If you are still unable to gain access to the lab with your ID card, please visit the Help Desk or send an email to Bugzilla. Be sure to include your ID number, course number, and lab room (MS239).
GLUT
As a couple people have noticed, the instructions I posted for compiling the Hello World example don't work on the lab machines. The problem is that Red Hat requires some additional X libraries for GLUT. The correct command for the lab machines is
g++ -o helloworld -lGL -lGLU -lglut -lXi -lXmu -L/usr/X11R6/lib helloworld.cpp
Sorry for the confusion.
If you have any questions, see me in lab or fire off an email.
Assignment 1 posted
Click title to readThe first assignment has been released. You have 2 weeks to finish it, and I suggest starting sooner than later. Please familiarize yourself with the submission procedure as well.
Assignment 1 (PDF)
Sept. 19 Lab
Click title to readToday we will do a programming exercise with OpenGL and Qt, written up here. The exercise is based on a barebones Qt/GL application -- feel free to use this as a basis for your assignments and even the project.
If you have Qt installed on a Windows machine, this code should work without modification. The only difficulty is specifying the proper build steps in MSVC++ or whatever IDE you're using. If you want to use Qt + OpenGL in Windows, check out John Brosz's tutorial:
http://pages.cpsc.ucalgary.ca/~brosz/TA/589/qt/index.html
One caveat: in the past few years, the makers of Qt have become less supportive of open-source or academic uses of Qt. Therefore, it can be difficult to get a version of Qt equivalent to the one on the school machines. There is a note about this in John's tutorial.
If you are having difficulty getting your code running in Windows, give me a shout and I can probably help you out.
Update I downloaded the Qt open-source version (link) and tried it on my machine. The only compiler it seems to support is g++, so if you are using MS Visual C++ or .NET, you're out of luck. Your best bet is probably Q.... Alternatively, you could try an old non-commercial version.
I would recommend this one for VC 6.0 users, as it requires no compilation and is verified to work with 6.0 (not .NET). There are also plenty of examples, each with a 6.0 project file and Linux makefile.
Sept. 17 Lab
Click title to readToday's lab was canceled due to illness. My apologies, but I should be good to go on Wednesday.
In the first lab, we cover the basic introductions to the course, and then do a brief review of OpenGL. As 453 is a prerequisite for this course, you're expected to have some familiarity with 3D graphics programming in OpenGL. You won't have much difficulty catching up if you haven't used it before, though.
You should refresh your memory of the transformation pipeline. This site has a nice summary of the different coordinate spaces and the corresponding OpenGL calls that define them.
OpenGL is a state-based callback architecture. State-based means that whenever you call a function that modifies some parameter -- such as rendering color, lighting on/off, etc. -- it stays that way until another call changes the parameter. Callback means that most of the interesting parts of your 3D code are only executed when an event occurs, either system-generated (eg. redraw) or user-generated (eg. mouse click).
The main callback functions are:
- redraw (
glutDisplayFunc()), - window resize (
glutReshapeFunc()), - mouse events (
glutMouseFunc(),glutMotionFunc()), - keyboard events (
glutKeyboardFunc()).
As a quick review, download the code for an OpenGL Hello World here and try to do the exercises at the end.
In Wednesday's lab, we will do a programming exercise with OpenGL and Qt.
Welcome!
Click title to readLabs will begin next week, on Sept. 17. Be aware that the graphics lab has moved from MS631 to MS239.
Some general information:
- The best way to contact me is via email (olsenl@cpsc). I don't have any office hours scheduled, but could do so if there is demand for it. Otherwise, the best way to get help outside of labs is to set up a meeting with me via email.
- The assignments will have a programming component. We will be using OpenGL as the graphics API, but the other variables (programming language, windowing system) are currently undecided. Typically we have required a combination of C++, Qt, and OpenGL, but may open this up a bit this semester. We'll talk more about this in the first lab.
- There will also be a project component. You are free to choose your development environment for the project.
Grades
Indexed by last 4 digits of student ID
| Student | A1 (/130) | A2 (/100) | A3 (/100) |
| 0385 | 130 | 113 | 89 |
| 2119 | 138 | 118 | 94 |
| 2781 | 118 | 89 | 87 |
| 3892 | 100 | 79 | 97 |
| 5269 | 135 | 0 | 87 |
| 6605 | 136 | 90 | 86 |
| 7007 | 140 | 88 | 88 |
| 7925 | 147 | 135 | 100 |
| 8257 | 132 | 92 | 92 |
| 8646 | 136 | 137 | 100 |
| 9530 | 97 | 0 | 0 |
| 9819 | 130 | 114 | 100 |
| Avg | 128 | 106 | 93 |
