Graphics Reference
In-Depth Information
3.7.1 The Cartesian form of the line equation
With reference to Fig. 3.15, our objective is to establish an equation defining q in terms of the
line equation.
Y
n
Q
q
O
X
Figure 3.15.
We begin the process by defining the line equation as ax
c and making Q the nearest
point on the line to the origin with position vector q , which is perpendicular to the line. From
the line equation, the vector normal to the line is
+
by
=
n
=
a i
+
b j
(3.26)
and for the moment we will assume that n is not a unit vector. Let
q
=
x i
+
y j
Therefore,
n
·
q
=
ax
+
by
=
c
(3.27)
We now need to find the coordinates of Q and its distance from the origin.
As q is parallel with n , let
q
=
n
(3.28)
where is a scalar that has to be found to solve the problem.
Using n , take the dot product of Eq. (3.28) and substitute it in Eq. (3.27):
n
·
q
=
n
·
n
Therefore,
n
·
n
=
c
where
c
c
=
n =
2
(3.29)
n
·
n
 
Search WWH ::




Custom Search