Fall 2011 CS5310 Computer Graphics

Assignment 0

Professor Harriet Fell


There are two parts to this assignment.
  1. 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 your work so that I can:
  2. You will write your own 3D vector tools (e.g. as a JAVA class) that you will use for your later programming assignments.

Part 1: RGB Triangle

Write a program that generates a picture of a triangle in arbitrary position, such that the color at each pixel within the triangle is the blend of the colors of the vertices of the triangle as determined by the barycentric coordinates of the pixel. The color must be generated one pixel at a time and written to a ppm file.

Here are some triangles that were generated by such a program.

shaded triangle shaded triangle shaded triangle
RGB at the vertices Other RGB Colors at the Vertices
See /course/csg140/codeSamples for code samples. (This directory is still active and systems has not yet created a cs5310 directory.)

Part 2: Vector Tools

Write a class (in your preferred language) for handling 3D vectors of doubles. You should also write a driver that tests your class. Your class should allow you to:

What to submit
One zipped folder that contains a folder for each part of this assignment.

How to submit

Follow the turn in instructions.

By midnight Tuesday, September 20, 2011

Your project will be graded on:

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 #202WVH
Boston, MA 02115

Phone: (617) 373-2198 / Fax: (617) 373-5121

Last Updated:
The URL for this document is: http://www.ccs.neu.edu/home/fell/CS5310/Assignments/CS5310F2011prog0.html
hit counter