Angel and Shreiner: Interactive Computer Graphics, Seventh
Edition
Chapter 8 Odd Solutions
8.1 First, consider the problem in two dimensions. We are looking for an α
and βsuch that both parametric equations yield the same point, that is
x(α) = (1 α)x1+αx2= (1 β)x3+βx4,
These are two equations in the two unknowns αand βand, as long as the
line segments are not parallel (a condition that will lead to a division by
8.3 If we clip a convex region against a convex region, we produce the
intersection of the two regions, that is the set of all points in both regions,
8.5 See Problem 5.22. Nonuniform scaling will not preserve the angle
8.7 Note that we could use OpenGL to, produce a hidden line removed
image by using the z buffer and drawing polygons with edges and interiors
the same color as the background. But of course, this method was not
used in pre–raster systems.
8.9 The O(k) was based upon computing the intersection of rays with the
planes containing the kpolygons. We did not consider the cost of filling the
polygons, which can be a large part of the rendering time. If we consider a
1
8.11 There are a number of ways we can attempt to get O(klog k)
8.13 If we consider a ray tracer that only casts rays to the first intersection
and does not compute shadow rays, reflected or transmitted rays, then the
image produced using a Phong model at the point of intersection will be
8.15 Consider a circle centered at the origin: x2+y2=r2. If we know that
a point (x, y) is on the curve than, we also know (x, y), (x, y),
8.17 Flood fill should work with arbitrary closed areas. In practice, we can
8.19 Note that if we fill by scan lines vertical edges are not a problem.
Probably the best way to handle the problem is to avoid it completely by
never allowing vertices to be on scan lines. OpenGL does this by having
2
8.21 Although each pixel uses five rays, the total number of rays has only
8.23 A mathematical answer can be investigated using the notion of
reconstruction of a function from its samples (see Chapter 7). However, a
8.25 We want klevels between Imin and Imax that are distributed
exponentially. Then I0=Imin,I1=Imin r,
Imin )
8.27 If there are very few levels, we cannot display a gradual change in
brightness. Instead the viewer will see steps of intensity. A simple rule of
thumb is that we need enough gray levels so that a change of one step is
not visible. We can mitigate the problem by adding one bit of random
noise to the least significant bit of a pixel. Thus if we have 3 bits (8 levels),
3