Graphics Reference
In-Depth Information
7.6.7 Implicit Lines
We've already encountered the parametric form of a line (Equation 7.24). There's
another way to describe the line between P and Q : Instead of writing a function
t
( t ) whose value at each real number t is a point of the line, we can write
a different kind of function—one that tells, for each point ( x , y ) of R 2 , whether
the point ( x , y ) is on the line. Such a function is said to define the line implicitly
rather than parametrically. Such implicit descriptions are frequently useful; we'll
see shortly that computing the intersection of two parametrically described lines is
more difficult than computing the intersection of a parametrically defined line and
an implicitly defined one. Since the operation of intersecting lines (or rays) with
objects is one that arises frequently in graphics (we're very interested in where
light, which travels in rays, hits objects in a scene!), we'll examine such implicit
descriptions more fully.
If F : R 2
→ γ
R is a function, then for each c , we can define the set
L c =
{
( x , y ): F ( x , y )= c
}
,
(7.66)
which is called the level set for F at c . As an example, consider an ordinary
weather map. To each point ( x , y ) on the map there's an associated temperature
T ( x , y ) . The set of all points where the temperature is 80 F is a level set, as are
the sets where the temperature is 70 F, 60 F, etc. These sets are typically drawn
as curves on the map; each of them is a level set for the temperature function.
Similarly, a contour map like the one in Figure 7.11 typically has contour lines for
various heights—these curves represent the level sets of the height function. In
graphics, we often build a function F whose level set for c = 0 constitutes some
shape. This set is called the zero set of F .
Figure 7.11: A contour map
shows the height above sea level
with contour lines.
Inline Exercise 7.6: Can two temperature-contour curves on a weather map
ever cross? Why or why not?
7.6.8 An Implicit Description of a Line in a Plane
How can we find a function F whose value, on points of the line containing two
distinct points P and Q , is zero, but whose value elsewhere is nonzero, that is, how
can we find an implicit description of the line? Ponder that question briefly, then
read on.
n
X
Q
P ) ; then the vector n is perpendicular to the
line (see Figure 7.12). A nonzero vector with this property is said to be a normal
vector or simply a normal to the line.
First, 4 let n =
×
( Q
P )=( Q
P
Figure 7.12: The vector n =
( Q P ) is perpendicular to the
line through P and Q. A typical
point X of this line has the prop-
erty that ( X P ) is also per-
pendicular to n . Indeed, a point
X is on the line if and only if
( X P ) · n = 0 .
Inline Exercise 7.7: The vector n is called a normal rather than the normal;
show that this is justified by explaining why 2 n and
n are also normals to the
line.
If X is a point of the line, then the vector X P points along the line, and so
is also perpendicular to n .If X is not on the line, then X
P does not point along
the line, and hence is not perpendicular to n . Thus,
4. Note that we're using the 2D cross product defined in Equation 7.34 here.
 
 
 
 
Search WWH ::




Custom Search