Civil Engineering Reference
In-Depth Information
2.4.8 Distance between a line segment and a
triangular facet in space, d(PQ, ABC)
The following are the steps in the determination of the distance between line segment Q
1
Q
2
and triangle P
1
P
2
P
3
in space.
i. Compute the barycentre co-ordinates (λ
1
,λ
2
,λ
3
) and (μ
1
,μ
2
,μ
3
) of Q
1
and Q
2
w.r.t. tri-
angle P
1
P
2
P
3
λ
1
=
e
1
⋅ P
2
Q
1
,
λ
2
=
e
2
⋅ P
3
Q
1
,
λ
3
=
e
3
⋅ P
1
Q
1
μ
1
=
e
1
⋅ P
2
Q
2
,
μ
2
=
e
2
⋅ P
3
Q
2
,
μ
3
=
e
3
⋅ P
1
Q
2
where
e
1
,
e
2
and
e
3
are unit vectors along the barycentre co-ordinate axes.
ii. As shown in Figure 2.18a, the minimum distance is given by the distance from an end
point to the triangular facet if
λ
1
≥ 0, λ
2
≥ 0, λ
3
≥ 0 and h
1
(h
2
− h
1
) ≥ 0, then d
min
= h
1
On the other hand, if
μ
1
≥ 0, μ
2
≥ 0, μ
3
≥ 0 and h
2
(h
1
− h
2
) ≥ 0, then d
min
= h
2
iii. Otherwise, the minimum distance is given by the distance between the line segment
and an edge of the triangle, as shown in Figure 2.18b.
Q
1
Q
2
is on the side P
2
P
3
if
λ
1
≤ 0 or μ
1
≤ 0, d
min
= d(Q
1
Q
2
, P
2
P
3
)
Q
1
Q
2
is on the side P
3
P
1
if
λ
2
≤ 0 or μ
2
≤ 0, d
min
= d(Q
1
Q
2
, P
3
P
1
)
Q
1
Q
2
is on the side P
1
P
2
if
λ
3
≤ 0 or μ
3
≤ 0, d
min
= d(Q
1
Q
2
, P
1
P
2
)
Q
1
Q
1
e
3
(a)
(b)
P
3
Q
2
P
1
d
min
= h
2
e
1
d
min
P
2
Q
2
e
2
Figure 2.18
Distance between a line segment and a triangular facet: (a) nearest point inside triangle; (b) near-
est point at an edge.