COS 426 - Computer Graphics

Spring 2012

Course home Outline and lecture notes Assignments


Assignment 0: C++ programming / HTML / Dropbox

Due Thursday, Feb. 16, 11:59 PM

The purpose of this assignment is to ensure that you have a C++ compiler installed, and are familiar with C++, HTML, and Dropbox. The assignment will be worth a small, but nonzero, amount.

You will be beginning to work with the same code you will be using for Assignment 1, which consists of an image-processing program that you will modify (imgpro) and a program (that you will use, not modify) for specifying pairs of lines to be used as input for image warping (morphlines - see description here). Feel free to read the Assignment 1 description to understand where you're headed, though the details of what you must implement are not yet officially finalized.

Getting Started

  1. Download the following skeleton code: cos426_assignment0.zip. Read over 00README.txt to learn the functions of the different files and directories.
  2. Read COMPILER.txt and install a C++ compiler on your development machine.
  3. If you are using Visual Studio, open the .sln file, and build the solution. Otherwise, cd into the src directory, and type make. Stop here and ask for help if you cannot successfully compile the imgpro and morphlines programs.
  4. Implement the R2Image::Brighten method in R2Image.cpp. You will need to read the R2Image.h and R2Pixel.h files to find out about the methods implemented for these classes. For this assignment (and only this assignment), you may consult with fellow students or TAs to understand how to implement the required function.
  5. Recompile the code.
  6. Run your code. On Unix/Mac/Cygwin, change into the main assignment directory (not the src/ subdirectory) and run make. With Visual Studio, open the "Visual Studio Command Prompt", change into the main assignment directory (not the src/ subdirectory) and run "nmake /f NMakefile". Look for the output files in the output/ subdirectory.
  7. Edit writeup.html to add a description of, and links to, the images you just created. Open writeup.html in a web browser to see the webpage.
  8. Create a .zip file containing the items to be submitted (see below), and submit it at the Dropbox link below.

Submitting

This assignment is due Thursday, February 16, 2012 at 11:59 PM. Please see the general notes on submitting your assignments, as well as the late policy and the collaboration policy.

Please submit a single .zip file named [your NetID]_cos426_assignment0.zip containing

The Dropbox link to submit your assignment is here.

Note that you are expected to use good programming style at all times, including meaningful variable names, a comment or three describing what the code is doing, etc. We will test your code by running make in your src/ subdirectory, followed by make in the main assignment directory to create the output images. Please ensure that your code builds/runs in this way.


Last update 9-Feb-2012 11:45:09
smr at princeton edu