Angel and Shreiner: Interactive Computer Graphics, Seventh
Edition
Chapter 2 Solutions
2.2 Each iteration removes the central triangle of the four created by
subdivision. If we start with an equilateral triangle, the area is reduced by
3/4 by each iteration. Hence, in the limit we have no area left. If we
consider the perimeter, again starting with an equilateral triangle, we find
2.8 The subtractive colors are often called the complementary colors.
Suppose each color in the RGB system can be written as the triplet (r,g,b)
where each value is between 0 and 1. Then, the complement of the color
2.9 We can solve this problem separately in the xand ydirections. The
transformation is linear, that is xs=ax +b, ys=cy +d. We must
maintain proportions, so that xsin the same relative position in the
viewport as xis in the window, hence
xxmin
xmax xmin
=xsu
w,
ymax ymin
2.10 The biggest advantage of relative positioning is that it corresponds to
the way we think. We use terms such as “in front of,” “next to,”, “to the
right,” “forward,” and “back” in speech to describe the location of objects.
1
2.11 Most practical tests work on a line by line basis. Usually we use
scanlines, each of which corresponds to a row of pixels in the frame buffer.
If we compute the intersections of the edges of the polygon with a line
2.12 A simple but inefficient test would be to compute the intersections of
all pairs of lines that are determined by the edges of the polygons. We
2.13 There are two fundamental approaches: vertex lists and edge lists.
With vertex lists we store the vertex locations in an array. The mesh is
represented as a list of interior polygons (those polygons with no other
polygons inside them). Each interior polygon is represented as an array of
pointers into the vertex array. To draw the mesh, we traverse the list of
interior polygons, drawing each polygon.
One disadvantage of the vertex list is that if we wish to draw the edges in
the mesh, by rendering each polygon shared edges are drawn twice. We
2
2.14 The advantage of an edge list is that when we traverse the edge list,
each edge is drawn exactly once which is efficient if polygons are rendered
2.15 The Maxwell triangle corresponds to the triangle that connects the
2.18 If can display four colors, there are 2 bits per pixel in the frame
2.19 Consider the lines defined by the sides of the polygon. We can assign
a direction for each of these lines by traversing the vertices in a
counter-clockwise order. One very simple test is obtained by noting that
2.21 Each of the four tetrahedrons that are created has 1/8 of the volume
of the original tetrahedron. Hence, by keeping only these four and
removing the middle volume, the resulting volume is half the original
volume. Each of the triangles that we create when we subdivide has 1/4
3