Spring 2007 CSG140 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 you 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.
RGB at the verticesOther RGB Colors at the Vertices

See /course/csg140/codeSamples for code samples.

Part 2: Vector Tools

Write a (Java) class 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
A zipped folder containing one folder for each part of this assignment.

How to submit
Email your zipped work as an attachment to fell@ccs.neu.edu with Subject: CSG140SP07-prog0.

By midnight Tuesday, January 23

These grading guidelines will be used for all programming assignments:
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
email: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121

Last Updated:
The URL for this document is: http://www.ccs.neu.edu/home/fell/CSG140/Assignments/CSG140SP2007prog0.html