Winter 2000 COM3370 Computer Graphics
Assignment 0
Introduction
In this assignment, you will choose a programming platform for the quarter and familiarize yourself with RGB color and the ppm format.
In part, this assignment is to ensure that you have a method of submitting you work so that I can:
- read the code
- compile (or interpret) the code
- run the code to produce a file in ppm format.
General description
Write a program that generates a picture with smooth gradations of color. The picture may be as simple as a color triangle or as complex as fractal tree (see Baback Elmieh, assignment 0, Spring 1999)
The color must be generated one pixel at a time and written to a ppm file.
Here is some code to get you started. It is written in C. The important thing to understand in this code is how to set up an appropriate buffer for the RGB information and how to write that information out to a file.
- Copy the contents of the rgbcube subdirectory in the directory:
/course/com3370.
It should contain:
- makefile: Makefile
- source code: crcolor.c
- input file: rgb.input
- output file: rgbcube.ppm.
- Open xv3 and load rgbcube.ppm. Experiment with reshaping the rgbcube window. Try out some of the features of xv3.
- Run make to create an executable rgb.
- Change the input file rgb.input by altering the maximum RGB levels or the horizontal and vertical values. Run rgb and note the effect of the changed values. Determine the limits on these values. Summarize your observations in your README.
- You may use crcolor.c as a shell for your program. Just modify the main computation to draw something else, e.g and RGB triangle. You may also write your program in another language or on another platform.
How to Submit
You may use turnin to turn in your program by e-mail. (Read the turnin directions first.) or you may submit a diskette, CDROM or zip disk.
Turn in:
- your source code. Your code should be well organized and commented.
- a makefile, if necessary.
- a README file containing:
- your name, the date, and the assignment number
- a list of the files in the folder with comment for each explaining its purpose
- instructions on how to run your program
- a description of any bug that you have not been able to fix. A documented bug will not cost you as much as an undocumented one.
- Your observations from item 4 above.
- Please do NOT email ppm files or executable code. I will generate them from your source code.
Due
By midnight Friday, July 29, 2001.
Grading
These grading guidelines will be used for all programming assignments:
Your project will be graded on:
- correctness (60%).
- style of your program (10% )
- documentation:
- inline comments (10%)
- README (10%)
- quality of the resulting image(s). (10%)
Some points may be subtracted (up to 10%) if you need substantial help from the TA or professor to make your program run.
The penalty for a late homework is 5% per calendar day for up to one week late.
No homework will be accepted later than that.
Harriet Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #161CN,
Boston, MA 02115
email: graphics@harrietfell.com
Phone: (617) 373-2198 / Fax: (617) 373-5121
Last Updated: June 12, 2000 1:51 pm
The URL for this document is:
http://www.ccs.neu.edu/home/fell/COM3370/COM3370prog0.html