CS 248: Introduction to Computer Graphics
Pat Hanrahan
Assignment 1 Frequently Asked Questions (FAQ)
- Q1. How can I let the user control the brush size/opacity,
etc?
- Q2. I don't understand the "orientation" part of the
assignment.
- Q3. What if the window is covered?
Answers
Q1. How can I let the user control the brush
size/opacity,
A1.
- Let the user decrease the brush size through the "1" key
and increase brush size through the "0" key. You may have
a fixed number of sizes for the brushes. (Five is a good number).
- The brush size control does not have to influence the
orientation of the strokes.
- Let the user type in floating point values at a prompt (in the xterm
window, not in the painting window) to control the opacity of the strokes.
Q2. I don't understand the "orientation" part of the
assignment.
A2.
Circles do not have to be oriented.
Rectangles
- First orientation method: they have a fixed orientation at 45 degrees.
- Second method: the long side of the rectangle follows the
direction of the stroke.
- Third method: their orientation is random.
Lines
- First orientation method: they have a fixed direction 45 degrees (slope of
1).
- Second method: their direction follows the direction of the stroke.
- Third method: their direction is random.
Q3. What if the window is covered?
A3.Save the pixels of the image and you may assume that when you
are saving the image its window will not be obscured by other windows. You
don't have to save the strokes of the session.
Copyright © 1996 Pat Hanrahan