Graphics Reference
In-Depth Information
3.8.1 The Cartesian form of the line equation
The strategy is virtually identical to that used in Section 3.7, apart from the fact that the point
is not located at the origin.
Figure 3.19 shows a typical scenario with the point P and its closest neighbor Qxy on the
line. There are four vectors to consider:
n is the line's normal vector,
p is P's position vector,
q is Q's position vector, and
n connects P to Q, where is a scalar.
Y
n
Q
λ n
q
P
p
X
Figure 3.19.
With reference to Fig. 3.19, let the line equation be
ax
+
by
=
c
Then the vector normal to the line is
n
=
a i
+
b j
Let
q
=
x i
+
y j
Therefore,
n
·
q
=
ax
+
by
=
c
(3.35)
From Fig. 3.19, we have
q
=
p
+
n
(3.36)
The objective is to find the value of .
Multiply Eq. (3.36) throughout using n :
n
·
q
=
n
·
p
+
n
·
n
(3.37)
 
Search WWH ::




Custom Search