Graphics Reference
In-Depth Information
We cancel the denominator in Eq. (6.12) by multiplying throughout with
a
×
b
:
·
−
OT
=
·
−
OT
d
a
×
b
a
×
b
a
×
b
+
a
×
b
·
a
×
b
·
−
OT
=
·
−
OT
×
×
+
×
a
b
a
b
d
a
b
(6.13)
We now need to substitute Eqs. (6.10) and (6.11) in Eq. (6.13):
q
+
a
×
b
·
b
=
a
×
b
·
q
+
a
+
d
a
×
b
q
·
a
×
b
+
b
·
a
×
b
=
q
·
a
×
b
+
a
·
a
×
b
+
d
a
×
b
×
·
×
=
·
×
=
As
a
b
, and
a
b
are mutually perpendicular,
b
a
b
0 and
a
a
b
0.
Therefore,
q
−
q
·
a
×
b
=
d
a
×
b
and the shortest distance is
q
=
q
−
·
a
×
b
d
a
×
b
Let's test this equation with a simple example, as shown in Fig. 6.7. By inspec
t
ion, the shortest
line between the two lines is a perpendicular to
a
from the origin, which is
√
2
2
in length.
Y
b
q
′
1
q
1
a
X
Z
Figure 6.7.
The lines have the following definitions:
k q
=
q
=
k
a
=
i
−
0
b
=
j
Calculating
a
×
b
gives us the following table.
i
j
k
a
1
0
-1
b
0
1
0
a
×
b
1
0
1