Graphics Reference
In-Depth Information
(c) Show that the formula is correct by arguing that area is a continuous
function of coordinates, and that there is, at most, one extension of a continu-
ous function on X to a continuous function on X
boundary( X ) when X is a subset
of R n .
Exercise 7.15: Another approach to generalizing the area formula from the
“one vertex at the origin” case to the general case is this: Compute the signed
area of the triangle P 0 P 1 P 2 by computing the signed areas of QP 0 P 1 , QP 1 P 2 , and
QP 2 P 0 and then adding or subtracting appropriately. Draw a picture to figure out
what the relationship among the four signed areas should be, and use it to derive
the general formula for the signed area of P 0 P 1 P 2 .
Exercise 7.16: Numerical considerations: In the formula for the area of a poly-
gon, suppose that we are using finite precision arithmetic and we add L , where L is
a very large number, to the x -coordinates of all the polygon's vertices. What hap-
pens to the computation? What if we instead perform the computation by writing
the coordinates of the vertices in a coordinate system based at the “center” of the
polygon—the average of all the vertices?
Exercise 7.17: Consider a ray that starts at P =(
3 ) and has direction
3,
d = 1
2
. It intersects the ellipse defined by ( 3 ) 2 + y 2 = 1 at two points. To find
these points, we can write
R ( t )= P + t d
(7.142)
R ( t ) T 1
R ( t )= 1
/
30
01
(7.143)
where the T indicates transpose. If we solve the second equation for t , we will
have found the parameters t 1 and t 2 of the intersection points, from which we can
compute the points.
(a) Draw a picture representing this situation.
(b) Confirm that the equations above really do determine the points of intersection
by writing out the product explicitly.
(c) Now consider the intersection of the ray defined by the point Q =(
1,
3 )
and the direction e = 1
, with the unit circle. Once again, draw a picture and
express this problem as a similar pair of equations; the matrix in this case will be
the identity matrix.
(d) Expand these latter equations; compare them to the ones you arrived at in
part (b).
(e) Explain the similarity: How are d and e related? How are the ellipse and the
unit circle related? We'll return to this kind of transformation from a general prob-
lem (compute an intersection with an ellipse) to an equivalent standard problem
(compute an intersection of a different ray with the unit circle) when we study ray
tracing.
Exercise 7.18: The function
/
3
2
R 2 : t
γ
: R
( 3 + 2 t ,4
3 t ) describes a
line in parametric form.
(a) Find two distinct points P and Q on the line. (There are an infinite number of
correct answers to this part.)
(b) Use these two to find an implicit form for the line; convert via algebra to the
form Ax + By + C = 0.
Search WWH ::




Custom Search