Winter 2000 COM3370 Computer Graphics

Assignment 0

Professor Harriet Fell


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:

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.

  1. Copy the contents of the rgbcube subdirectory in the directory: /course/com3370. It should contain:

  2. Open xv3 and load rgbcube.ppm. Experiment with reshaping the rgbcube window. Try out some of the features of xv3.

  3. Run make to create an executable rgb.

  4. 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.

  5. 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: