Graphics Reference
In-Depth Information
To begin with, we must anticipate all the possibilities that could arise with two lines: the
first is that the lines do intersect, giving a single point of intersection; second, the lines could
be coincident, producing an infinite number of intersections; and third, the lines are distinct,
but parallel, producing no intersections. Although one can approach this problem using line
equations, we consider only a vector approach.
Y
S
a
P
b
R
s
r
p
X
Figure 3.33.
The lines are shown in Fig. 3.33 and are defined as follows:
p
=
r
+
a
p
=
s
+
b
where and are scalars, and the direction vectors are
=
+
a
x a i
y a j
b
=
x b i
+
y b j
The task now is to discover the values of and at the point P. Let P x P y P be the point of
intersection of the two lines and p its position vector. Therefore,
r
+
a
=
s
+
b
(3.66)
In order to isolate , we multiply Eq. (3.71) by b :
b ·
b ·
b ·
a
=
s
r
+
b
and as b ·
b
=
0,
b ·
s
r
=
b ·
a
from which we can state that
x b y S
y R
y b x S
x R
=
x b y a
x a y b
 
Search WWH ::




Custom Search