Graphics Reference
In-Depth Information
(
X
−
P
)
·
n
=
0
(7.67)
completely characterizes points
X
that lie on the line. We can therefore define
F
(
X
)=(
X
−
P
)
·
n
,
(7.68)
which serves as an implicit description of the line. We'll call this the
standard
implicit form for a line.
Inline Exercise 7.8:
What are the domain and codomain of the function
F
just
defined?
Inline Exercise 7.9:
Our discussion assumes that
P
and
Q
are distinct. What
set does the function
F
implicitly define if
P
and
Q
are identical?
P
=
2
4
and
As a concrete example, if
P
=(
1, 0
)
and
Q
=(
3, 4
)
, then
Q
−
n
=
−
. Letting
X
have coordinates
(
x
,
y
)
,wehave
F
(
x
,
y
)=
x
4
2
−
=
0
−
1
4
2
·
(7.69)
y
−
0
as the implicit form of our line; expressed in coordinates, this says
−
4
(
x
−
1
)+
2
y
=
0
(7.70)
or
−
4
x
+
2
y
−
1
=
0,
(7.71)
which is the familiar
Ax
+
By
+
C
=
0 form for defining a line.
Both the implicit and parametric descriptions of lines generalize to three
dimensions: Given two points in 3-space, the parametric form of Equations 7.28
given above will determine a line between them. The implicit form (i.e.,
(
X
−
P
)
n
=
0) determines a
plane
passing through
P
and perpendicular to the vector
n
; to determine a single line, we must take two such plane equations with two
nonparallel normal vectors.
·
7.6.9 What About
y
b
?
In graphics we generally avoid the “slope-intercept” formulation of lines (an equa-
tion of the form
y
=
mx
+
b
;
m
is called the
slope
and the point
(
0,
b
)
is the
y
-
intercept,
i.e., the point where the line meets the
y
-axis), because we cannot use
it to express vertical lines; the “two-point” implicit and parametric forms above
are far more general, and formulas involving them generally don't need special-
case handling.
=
mx
+
We now have two forms for describing lines in the plane: implicit and paramet-
ric. (The parametric form extends to lines in
R
n
.) With the help of the exercises,