Civil Engineering Reference
In-Depth Information
2.4.11 Determine whether a point is inside or
outside of the problem domain
There are many ways to determine if a point is inside or outside a bounded domain in 2D
or 3D. Since the mesh domain is bounded by oriented boundary segments on 2D and tri-
angular facets on 3D, a simple yet robust method to determine its position relative to the
problem domain can be devised by checking its orientation relative to the nearest boundary
edge/face.
2.4.11.1 Two-dimensional domain
Let Ω be a 2D region bounded by boundary segments =
. Given a point P, the
{
AB i
,
=
1
,}
n
ii
boundary segment nearest to P is given by
AB
= =1,
mindPABAB
i
(,
),
∈B
ii
ii
n
Calculate the signed area of triangle ABP. If the area of triangle ABP is greater than zero,
P is inside Ω; if the area is less than zero, P is outside Ω; and if the area is equal to zero, P is
on the boundary, as shown in Figure 2.24a. In case there are two nearest segments (P is
nearest to a boundary node), choose the one that is not intersected by the other nearest edge.
2.4.11.2 Three-dimensional domain
Let Ω be a 3D region bounded by boundary faces =
. Given a point P, the
{
ABCi
,
=
1
,}
n
ii i
boundary face nearest to P is given by
ABCmin dP ABCABC
i
= =1,
(,
),
∈B
ii i
i
i
i
n
Calculate the signed volume of tetrahedron ABCP. If the volume of tetrahedron ABCP is
greater than zero, P is inside Ω; if the volume is less than zero, P is outside Ω; and if the vol-
ume is equal to zero, P is on the domain boundary, as shown in Figure 2.24b. In case there
are more than one nearest faces (P is nearest to a boundary node), choose the one that is
(a)
(b)
P
B
P is inside Ω
P
B
C
B
A
A
A
C
P
P
B
A
Figure 2.24 Check whether a point is inside or outside a bounded region: (a) 2D domain; (b) 3D domain.
Search WWH ::




Custom Search