Graphics Reference
In-Depth Information
P
1
n
P
1
P
2
P
2
Figure 3.11.
Now we let
b
j
be perpendicular to
−−→
n
=
a
i
+
P
1
P
2
Therefore,
−−→
P
1
P
2
·
n
=
0
and
x
2
−
x
1
i
+
y
2
−
y
1
j
·
a
i
+
b
j
=
0
ax
2
−
x
1
+
by
2
−
y
1
=
0
ax
2
−
ax
1
+
by
2
−
by
1
=
0
a
b
=
y
1
−
y
2
x
2
−
x
1
Therefore,
a
=
y
1
−
y
2
and
b
=
x
2
−
x
1
The general form of the line equation is
y
1
−
y
2
x
+
x
2
−
x
1
y
+
c
=
0
(3.13)
c is found by substituting P
1
or P
2
in Eq. (3.13).
We now evaluate Eq. (3.13) for each boundary edge.
−−→
P
1
P
2
x
1
=
2
y
1
=
1
x
2
=
3
y
2
=
2