Computer Graphics I

4003-570 / 4005-761

Homework 2: Line Drawing and Polygon Fill 



Date assigned: September 21, 2011
Date due: September 28, 2011

Please submit your work in the dropbox on myCourses
 

Overview

This homework is designed to give you practice working with the midpoint line equations and the edge table method for doing polygon fill. The first part of the homework involves deriving another set of midpoint line algorithm delta equations; the second involves building the initial edge tables for several different polygons.


Part 1: Line Drawing

Recall the midpoint line algorithm equations we derived in class for small-positive-slope lines (0 < m < 1).

Perform the same series of equation derivations for lines which have a large negative slope (m < -1). For these lines, the direction choices are S (South) and SE (Southeast). Give values for each of the following items:

Due to the limitations of plain text, follow these conventions for representing points and equations:

Remember that the final equations (initial d and the deltas) should be expressed using the values for a, b, and c derived from the original implicit and slope/intercept line equations, and that only addition, subtraction, and multiplication should appear in the final equations.


Part 2: Edge Tables

For each of the following figures, show the entries which would be put into the edge table for the figure when preparing to use the polygon fill algorithm discussed in class. For each entry, give the following information:

Only show those entries which would actually be put into the table (i.e., if an edge should be left out of the table, don't show it in your answer).

When filling in your answers, use this naming scheme:

Following this naming scheme, the first polygon below has edges AB, AC, and CB.

Vertex Coords
A (2,2)
B (7,5)
C (2,9)
Vertex Coords
A (2,7)
B (4,4)
C (8,4)
D (4,9)
Vertex Coords
A (4,2)
B (6,2)
C (6,4)
D (8,4)
E (10,6)
F (7,10)
G (5,10)
H (5,8)
I (2,8)
J (2,4)