Abstract

This paper aims to disclose the compound topological and directional relationships of three simple regions in the three-dimensional (3D) space. For this purpose, the directional model and the 8-intersection model were coupled into an R5DOS-intersection model and used to represent three simple regions in the 3D space. The matrices represented by the model were found to be complete and mutually exclusive. Then, a self-designed algorithm was adopted to solve the model, yielding 11,038 achievable topological and directional relationships. Compared with the minimum bounding rectangle (MBR) model, the proposed model boasts strong expressive power. Finally, our model was applied to derive the topological and directional relationships between simple regions A and C from the known relationships between simple regions A and B and those between B and C. Based on the results, a compound relationship reasoning table was established for A and C. The research results shed new light on the representation and reasoning of 3D spatial relationships.

1. Introduction

The reasoning of spatial relationship, a.k.a. spatial reasoning, can be implemented quantitatively or qualitatively. Qualitative spatial reasoning, aiming to represent and analyze spatial information, is an important tool in artificial intelligence (AI), machine vision, robot navigation [1, 2], and geographic information system [3].

Over three decades, many theories and models have been developed for spatial reasoning. For instance, Randell et al. [4, 5] put forward the region connection calculus (RCC) theory. Egenhofer and Franzosa [6, 7] proposed the theory of 4-intersection model and 9-intersection model. Li [8] derived a dynamic reasoning method for azimuth relationship.

In recent years, spatial reasoning has evolved rapidly, thanks to the emerging AI applications in image processing [9, 10], computer vision [11, 12], and model prediction [13]. However, most studies on spatial reasoning focus on the spatial relationships on two-dimensional (2D) planes rather than those in three-dimensional (3D) spaces. The 3D space contains too many information elements to be handled by ordinary reasoning methods.

At present, the relationships between objects in the 3D space are mostly solved by compound reasoning. The common approaches of compound reasoning include the compound reasoning of directional and topological relationships [14, 15] and the compound reasoning of directional and distance relationships [16]. Liu et al. [17] designed a 3D improved composite spatial relationship model (3D-ICSRM) in a large-scale environment and proposed a reasoning algorithm to solve that model. The accuracy of the 3D-ICSRM is very limited, and it considers the relationship between qualitative distance and direction. In 2016, Hou et al. [18] extended the convex tractable subalgebra into 3D space and used the BCD algorithm to calculate it. In 2019, Wang et al. [19] extended the oriented point relation algebra (OPRAm) model to 3D and proposed oriented point relation algebra in three-dimensional (OPRA3Dm) algorithm, which has certain practical significance. These two papers consider the direction relationship. In recent years, the literature mainly studies the relationship between the direction and qualitative distance, while there is less research on the direction and topological relationship. This article will focus on the direction and topological relationship to fill the gaps in this field.

This paper aims to disclose the compound topological and directional relationships of three simple regions in the 3D space. Firstly, the RCC-5 model was combined with a strong directional relationship model for two simple regions, based on the extended 4-intersection theory and spatial orientation relationship in RCC5. The combined model was used to identify the compound topological and azimuth relationships between two simple regions, and solved by a self-designed algorithm. Through programming, a total of 65 topological and directional relationships were obtained in the 3D space.

On this basis, the extended 4-intersection matrix was replaced with an 8-intersection matrix to represent the 3D spatial topological and directional relationships between three simple regions. Then, it was found that the topological and directional relationships between the R5DOS-intersection model of two regions and three regions are complete and mutually exclusive. Further programming reveals a total of 11,038 topological and azimuth relationships between three simple regions in the 3D space and derives a simple topological and directional relationship R (A, C) from two sets of two simple regions R (A, B) and R (B, C).

2. Materials and Methods

2.1. RCC Theory

In 1992, Randell et al. [4, 5] proposed the RCC theory and established the RCC-8 intersection model, which is a boundary-sensitive model. Based on the boundary-sensitive conditions, the RCC-5 intersection model can be derived (Figure 1).

In 1991 and 1995, Egenhofer et al. constructed an extended 4-intersection matrix, which covers two space objects A and B, with A° being the interior of A:

The value of each position set is either empty or nonempty. Then, the five kinds of relationships in the RCC-5 intersection model can be represented as the matrix in Table 1 and expressed as a set .

For three simple areas A, B, and C, can be partitioned into 8 parts (Figure 2).

The eight parts can be illustrated by an 8-intersection matrix:

The RCC theory fuels the research on spatial relationship models in the past three decades, giving birth to many new theories. Nonetheless, most of these theories target the 2D plane rather than the 3D space. Recently, there is a growing interest in the spatial relationship models of the 3D space, especially the compound reasoning of directional and topological relationships, and that of directional and distance relationships.

2.2. Orientation Model

Minimum bounding rectangle (MBR) is a commonly used model for directional relationship in space [1820]. The MBR model, 8-direction model, and 16-direction model are shown in Figure 3 below. The MBR model is not consistent with human cognition of directions.

In 2010, He and Bian [21] came up with a special 8-direction cone model (Figure 4), which divides the space into eight regions: NW, NE, EN, ES, SE, SW, WS, and WN. Among them, NW and NE belong to the N direction, EN and ES belong to the E direction, SE and SW belong to the S direction, and WS and WN belong to the W direction.

The 8-direction cone model is easy to describe and recognize and is flexible in dealing with relationships in multiple dimensions. Compared with the 8-direction cone model, the16-direction cone model is also consistent with the human cognition of directions, but too complicated to express. Hence, the 8-direction cone model is more suitable for the reasoning of spatial relationships.

Considering its excellence in spatial segmentation, the 8-direction cone model was coupled with the RCC-5 intersection model for compound reasoning of topological and azimuth relationships in the 3D space.

2.3. Model Construction

Any object in space is wrapped by an outer sphere ⊙A with a radius rA (Figure 5), that is, .

Taking the center of ⊙A as the origin of the rectangular coordinate system in space, the spatial Cartesian coordinate system can be established and the reference space can be divided into eight intervals by the x-, y-, and z-axes. Each interval is called a hexagram limit (Figure 6).

Suppose n points are scattered in the space. The centroid of the point set can be obtained by -means clustering (KMC) [20] and treated as the center of the sphere of point set B:

The outer sphere B completely covers the n points: . Similarly, the outer sphere C for point set C can be defined as follows:

If it is impossible to find the outer sphere of the space object, the object can be treated as an irregular convex object. Then, five planes can be inserted into the rectangular coordinate system in space (Figure 7).

Then, the 3D space can be represented as . The angle corresponding to each region can be described as follows:where is the dihedral angle of the plane . Adding the set of hexagram limits , the space can be divided into 16 regions:where DO is the set of 3D regions and their hexagram limits. If the center of outer sphere B exists in region 1NE, then B strongly exists in that region, denoted as s1NE. If outer sphere B partly exists in region 2NE, then B weakly exists in that region, denoted as w2NE. We let “0” indicate that there is no object in the area, “1” indicates that the object “strongly exists” in this area, and “2” indicates that the object “weakly exists” in this area. An example is shown in Figure 8:

For simplicity, only strong existence scenarios were considered. Then, the set of regions, where B strongly exists, can be defined as follows:wherewhere the dihedral angle formed by planes and , which is perpendicular to the x-axis and passes the straight line ab (Figure 9).

For two regions, the extended 4-intersection matrix can be introduced to the DOS:

For three regions, the 8-intersection matrix can be introduced to the DOS:

Our model consists of two layers: the first layer is the topological relationship R5 layer, and the second layer is the orientation relationship DOS layer. Then, the following definition can be derived.

Definition 1. For the orientation relationship layer, there isSupposeFor any two simple regions A and B, it is possible to obtain a 5 × 4‘0-1 matrix. In theory, a total of 220 matrices could be acquired, which correspond to 220 topological and directional relationships in the 3D space:Based on the topological relationship between outer spheres B and C, the existence of the centers of the two spheres can be described in two cases.

Case 1. Only the center of one outer sphere exists in the current region:

Case 2. The centers of both outer spheres exist in the current region:According to the above conditions, 28 × 316 matrices could be obtained theoretically, which correspond to 28 × 316 topological and directional relationships in the 3D space.

2.4. Model Properties

Definition 2. In layer R5, any m × n -order 0-1 matrices and can be defined as . Then, a 0-1 diagonal matrix can be established as Table 2.
The following proposition can be derived from Table 2:

Proposition 1. .
For , R (A, B) is the element that corresponds to the topological relationship R5 between any two simple regions A and B.

Then, the following theorem can be obtained.

Theorem 1. For simple regions A, B, and C, there exists .
Similarly, there exists .

Theorem 2. In the 3D space given by the R5DOS-intersection matrix, the topological relationship between the three simple regions is mutually exclusive and complete. The DOS space of the R5DOS-intersection matrix, which consists of 16 regions, is a half-open, half-closed interval with mutual exclusion. That is, for any three simple regions A, B, and C in the 3D space, there exists only one relationship satisfied by the ordered pair <A, B, C>.

Proof. For any three simple regions A, B, and C, the 8 and 16 regions divided by the 8-interesection matrix are disjoint. The 0-1 matrix of three simple regions uniquely corresponds to the matrix derived from the R5DOS-intersection model. In other words, the three regions have the relationship represented by this matrix so that the R5DOS-intersection matrix model gives a complete topological relationship in the 3D space.
Then, it is assumed that the topological relationship between A, B, and C corresponds to two matrices and and can be induced by the R53DOS-intersection model. Then, there exists such that . If , is both empty and nonempty, which is obviously contradictory. Hence, the above theorem was proved valid.

2.5. Constraints on Two Simple Regions

Theoretically, two simple regions might correspond to 220 matrices, but there must be 0-1 matrices that cannot be realized. Therefore, the following constraints were designed on two simple regions.Constraint 1: to correspond to a real-world topological relationship, the 0-1 matrix of layer R5 must belong to one of the five cases: .Constraint 2: if layer R5 satisfies , that is, outer spheres A and B are equal, then the 0-1 matrix of the DOS layer is . This means, when outer spheres A and B are equal, the center b of outer sphere B is G, which coincides with that of outer sphere A: .Constraint 3: since the 16 regions are disjoint, they must be mutually exclusive and complete. If R (A, B) does not fall at the center of outer sphere B, it can only exist in one of these regions. In the DOS layer, an outer sphere only exists in one of the 16 intervals. In this way, a total of 65 directional and topological relationships can be obtained (Table 3).

Case 1.

Case 2.

2.6. Constraints on Three Simple Regions

The following constraints were designed on three simple regions.Constraint 1: to uniquely correspond to the topological and directional relationships in the 3D space, a R53DOS matrix must satisfy the following conditions.

Definition 3. Constraint 2: since all three simple regions are bounded, is always 1.From Constraints 1 and 2, it can be inferred that layer R5 has109 topological relationships for any three simple regions in the 3D space.Constraint 3: after adding the orientation relationship, some topological relationships are not satisfied in the orientation regions. In some topological relationships, the center of an outer sphere will change with that of the other outer spheres. For instance, if layer , the outer sphere B will change with the overlap between outer spheres A and C (Figure 10).Case 1: if the A, B, and C are equal, they can be regarded as one area:Case 2: if any two of the three simple regions are equal, the ternary region can be regarded as a binary region with only one 1 in the DOS layer.Case 3: if any two of the three simple regions are inclusive or noninclusive, the ternary region can be regarded as a binary region when any two regions intersect and the sum of layer R5 is 4.Case 4: if only one of the three simple regions is inclusive or noninclusive, the ternary region can be regarded as a binary region when any two regions intersect and the sum of layer R5 is 5.Case 5: if the three simple regions are disjoint, the ternary region can be regarded as a binary region when any two regions intersect and the sum of layer R5 is 5.Case 6: if simple regions B and C are inclusive or noninclusive and separated from A, then the center of the A can only fall within B and C:For a ternary reference object in the 3D space, there are theoretically 28 × 316 matrices. Under the above constraints, a total of 11,038 matrices were obtained after removing the nonexistent scenarios.

2.7. Topological Relationship Algorithm for 3 Simple Regions in the 3D Space

The topological relationship algorithm for 3 simple regions in the 3D space can be implemented in the following steps.Step 1: assign each object a row vector [a1, a2, …, a24]. Generate a theoretical object of the type 28 × 316, i.e., a matrix A of 28 × 316 row vectors.Step 2: scan each row of matrix A, and mark all row vectors that satisfy the constraints.Step 3: save all the marked row vectors as a matrix B and output the matrix as the final result.

The pseudocode of the algorithm is displayed as follows.

Topological and directional relationship:

Gen (null; R53DOSa)//Input: null; output: topological relationship satisfying constraints (Algorithm 1).

(1)R53DOSaALL ⟵ 28 ∗ 316 basic topological relationships//All basic topological relationships
(2)R53DOSa  ⟵  null//TR empty Test
(3)for each x in R53DOSaALL
(4)  if x satisfies Constraint 1//if t satisfies Constraint 1Test
(5)   if x satisfies Constraint 2//if t satisfies Constraint 2Test
(6)    if x satisfies Constraint 3//if t satisfies Constraint 3
(7)     R53DOSa ⟵ {R53DOSa, x}//If the constraint is satisfied, t is placed in TR
(8)    end if
(9)   end if
(10)  end for
(11)  return R53DOSa//Return result

3. Results and Discussion

3.1. Comparison between R53DOS-Intersection Model and MBR Model

This section proves that the R53DOS-intersection model has stronger expressive power than the MBR model in the 3D space [2123].

First, layer R5 was defined as R (A, B) = PPI, R (A, C) = PPI, and R (B, C) = PPI, and the center of outer sphere B was assumed to fall into 1NE or 2NE. This situation does not exist in the real world. Under Constraints 2 and 4, there is no solution to this situation. However, the R53DOS-intersection model can explain the situation that cannot be realized in the 3D space.

Next, the R53DOS-intersection model was found capable of expressing situation that cannot be illustrated by the MBR model through the analysis of the following example. For any three external spheres AC in the 3D space, it is assumed that the topological and azimuth relationships between them are known, and these spheres are separated from each other.

For the MBR model, Example 1: (a) dir (A, B)=(1, 1, 1) and (b) dir (A, C)=(1, 1, 1) were obtained for the two examples (Figures 11 and 12).

For the R53DOS-intersection model, layer R5 can be described as R (A, B) = DR, R (A, C) = DR, and R (B, C) = DR. Then,

Without changing the positions of AC, the images of the R53DOS-intersection model in the two examples can be obtained as Figures 13 and 14, where green, blue, and red balls are the outer spheres A–C, respectively.

Example 2. (a) dir (A, B)=(0, 0, 1) and (b) dir (A, C) = (0, 1, 1) were obtained for the two examples (Figures 15 and 16).
In the same way, we can get the corresponding R53DOS-intersection model (Figures 17 and 18):Through the above comparison, it can be seen that the R53DOS-intersection model can represent the topological relationship of space objects A, B, and C, and it can accurately represent the spatial situation that the MBR model cannot represent.

3.2. Comnd Relationship Reasoning Based on R53DOS-Intersection Model

This section applies the R53DOS-Intersection Model to the reasoning of the compound relationships between simple regions in the 3D space. It is assumed that the topological and azimuth relationships between simple regions A and B and those between simple regions B and C are known in advance. Then, the goal is to deduce the possible topological and azimuth relationships between simple regions A and C.

According to Section 2.3, we have

Using the R53DOS-intersection model, a total of 65 topological and azimuth relationships were obtained from the real world. Hence, it is possible to obtain 65 0-1 matrices of 5 rows and 4 columns, which is denoted as . Targeting at region A, the topological and directional relationships between A and C and those between B and C were taken into account.

Since the topological and azimuth relationships between simple regions A and B and those between simple regions B and C are known in advance, we have . Then, the possible topological and orientation relationships between A and C were derived from the R53DOS-intersection model. According to Definition 2, we have

Suppose the real-world 0-1 matrices satisfy

Then, all 0-1 matrices must meet:

Hence, the matrix that does not satisfy the condition belongs to the empty set, namely, . This shows the topological and directional relationships R (A, B) and R (A, C) cannot be compounded. Then, all 0-1 matrices represented in the R53DOS-intersection model were judged one by one. The duplicates in the set {Mi = 1, …, n} were removed, leaving the possible topological and azimuth relationships between A and C.

In theory, there are a total of 65 × 65 = 4,225 topological-azimuth relationships R (A, B) and R (B, C). On this basis, the compound relationship reasoning table was set up (Table 4).

4. Conclusions

This paper extends the compound directional and topological relationships on the 2D plane to the 3D space and then creates the R53DOS-intersection model. Based on the model, a total of 11,038 directional and topological relationships were calculated. Compared with the MBR model, the proposed model can describe the relationships between simple regions accurately and express the relationships with sufficient clarity. To further improve the model, the future research will consider the impact of simple area boundaries on the model and apply the R5DOS model to the formation control of UAV formations.

Data Availability

The data used to support the findings of the study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

This work was supported by National Natural Science Foundation of China (Grant nos. 41601454 and 41671397), Science and Technology Development Project of Jilin Province China (Grant no. 20191001008XH), Science Foundation of Jilin Provincial Education Department China (Grant nos. JJKH20200329KJ and JJKH20190922KJ), Development and Reform Commission Project of Jilin Province China (Grant no. 2020C037-7), and Ecology and Environment Department Project of Jilin Province China (Grant no. 2019-02).

Supplementary Materials

This code is the screening algorithm of the R5DOS-intersection model. The purpose is to screen several matrices theoretically in the model according to the constraints and finally get the algorithm of the matrix that meets the requirements, the result of running the code needs simple processing, not the result of the article. The code is developed based on MATLAB software. (Supplementary Materials)