Graphics Reference
In-Depth Information
3.10.1 The parametric form of the line equation
For 2D lines we can exploit the perp operator.
Q
Y
u
q
v
P
p
X
Figure 3.27.
v
⊥
(Fig. 3.27).
Let the line's direction vector be
v
; therefore, the perpendicular vector is
u
=
Therefore, the equation of the perpendicular line is
q
=
p
+
u
or
v
⊥
q
=
p
+
Y
Q
u
=
j
q
v
=
i
p
=
i
P
X
Figure 3.28.
For example, Fig. 3.28 shows a 2D line where
v
=
i
and
u
=
j
If the point P is 10, then
p
=
i
and
v
⊥
q
=
p
+
q
=
i
+
j