CS 248: Introduction to Computer Graphics

Pat Hanrahan


Assignment 1

Handed out: Tuesday, January 14, 1997
Due: 5pm, Tuesday, January 28, 1997

Your assignment is to implement an impressionistic paint system, similar in spirit to Paul Haeberli's The Impressionist (this program exists as a Java Applet). Please try out Haeberli's program to get a feel for how the system should work.

Your version of the The Impressionist program will load a full color image, allow the user to create a painting, and then save the resulting image. The painting, unlike the original image, will consist of a set of brush strokes: each stroke will have a color, a shape, a position, a size and an orientation. The strokes will be created by the user, by sweeping the mouse over the image, in the process picking up the color from the original image and laying down a stroke at the cursor location.

Your system should have the following features.

To help you get started, and to help you concentrate on the more interesting aspects of this assignment, we will provide a sample program and a collection of interesting images. The sample program will read in a full color image, and store the image in a 2D array. This program will also implement a clear button that erases the canvas, and a save button (that saves the painting in a file).

70% of your grade will be based on the features that you implement. That is, you will lose points for each of the above features that does not work correctly. We will provide a test, in the form of a script of mouse actions, that you can use to generate a picture and compare it to our implementation. 20% of your grade will be based on the the "look and feel" of your program. Your program should be zippy, and not sluggish. Your program should also have a "reasonable, but not fancy" user interface (glut popup menus and keyboard controls are fine). And finally 10% of your grade will be based on programming style; in particular, we may take off points for obfuscated code, or very inefficient use of OpenGL.

Extra Credit. Up to 10 points of extra credit are available if you invent and implement painting modes NOT implemented or described in Haeberli's system or paper. To apply for extra credit, write a one paragraph description of what you have come up with, and why you think it is novel, unique and interesting. Only highly original ideas will be awarded extra credit.

hanrahan@cs.stanford.edu

Copyright © 1997 Pat Hanrahan