# Landscape Perspective Distance-Included Angle Shape Distribution Analysis Based on 3D CAD Model Retrieval Algorithm

Authors: Huijuan Bi
Journal: Advances in Multimedia
 (2022)

---

## Abstract

In view of the results obtained in the retrieval process of the 3D CAD model, which can show the differences in the local feature details of the model, the 3D CAD model retrieval algorithm is introduced into the analysis of the perspective distance-angle shape distribution of the garden landscape in this paper. Random sampling is performed on the surface of the constructed 3D CAD model, combined with the test distance between the sampling point and the neighboring points, and the corresponding garden landscape perspective distance-angle shape distribution characteristics in this area are calculated in order to achieve the similarity of the CAD model high-speed retrieval. Finally, experimental research shows that the algorithm proposed in this paper is better than the overall shape distribution algorithm and the spherical harmonic algorithm in the search performance of the CAD model, and it can effectively improve the recognition ability of the local detailed features of the 3D CAD model.


---

## Body

## 1. Introduction

With the continuous development of science and technology, it has become a trend to use 3D CAD technology to study the perspective distance-included angle shape distribution of garden landscapes. This technology plays an important role in the process of garden landscape perspective distance-angle shape distribution [1, 2]. As the technology began to be used on a large scale in different fields, it played a major role in the tendering and bidding of landscape engineering projects and how to make the company continue to accumulate different models in the design and research and development process to achieve effective management and key use of the model. Compared with the commonly used keywords and tags in the past, the 3D CAD model can be used to directly retrieve the perspective distance-angle shape of the garden landscape, which reduces the subjectivity and limitation of the description of the retrieval intention.In garden landscape design, the detailed features of the 3D CAD models are usually focused on by researchers. In the retrieval, through the effective reflection of local similarity differences between the models, the model resources can be constructed more accurately. Therefore, with the polygon mesh CAD model as the research target, a perspective distance-included angle shape distribution of garden landscapes based on the 3D CAD model search algorithm is put forward in this paper. By applying this model to its subregions and comparing it with other models, it verifies the practicability of the algorithm in this paper.


## 2. Analysis of the Perspective Distance-Included Angle Shape Distribution of Garden Landscapes

### 2.1. The Innovative in the Perspective Distance-Included Angle Shape Distribution of Garden Landscapes

In addition to reflecting rationality, the design of the landscape architecture plan should also emphasize innovation and abide by certain artistic rules in the design. One is the relationship between diversity and unity. Diversity means that when designing landscape gardens, including the build, the amount of the body, the color, the line, the form, the style, and other factors, the above various substances are taken into account so that they are unified and coordinated to form a certain degree of similarity or consistency and make people feel that there is a certain change in the unity. If the ideas of the elements in the design are not enough, it means that there is a change [3–5]. At this time, it makes people feel disorganized and unstructured. Second, grasp the relationship between coordination and comparison. The design of landscape gardens forms objects of different shapes through the grasp and innovation of build, color, line, proportion, virtual reality, empty and full, brightness or darkness, and so on to achieve the purpose of overall coordination. It is related to different sceneries. The third is the relationship between balance and stability. The landscape architecture is being designed, and it is necessary to consider the issue of color. If it is thick, it will be messy. The issue of quantity must also be considered. If it is too numerous, it will not be coordinated. According to the principle of balance, only a reasonable combination of plants of various weights can make it stable. The fourth is the relationship between rhythm and rhythm. The shape, color, and texture of plants can express the rhythm of the landscape. Willow trees need to be meticulous and funny, taking into account the mood and regularity, the effect most suitable for the landscape. The vegetation is arranged alternately to enhance the sense of rhythm.The pavement of landscape gardens is not the main landscape, but the coordination with unreasonable areas, making each area more definite, shape, and pattern are used to set off the environment, to increase the soundness feeling of the landscape garden. In the decorations centered on neutral tones, many colors are bright and not vulgar, but in general, bright colors and the spatial layout of landscape gardens are coordinated with each other, according to visual experience, to enhance the sense of direction and openness of landscape garden space design. After the partial design of the landscape garden is completed, the decoration of carving art can satisfy people’s love and psychological needs by designing flower beds, utensils, flower shelves, stone, vegetation, and so on. Separating the space of landscape gardens can make different scenic spots have distinctive signs. The overall environment of the landscape garden shows its unique artistic conception [6, 7].


### 2.2. The Rationality of Perspective Distance-Included Angle Shape Distribution of Garden Landscapes

The perspective distance-angle shape distribution of the landscape garden can reflect the designer’s layout thought, which is established through the designer’s thought. The design direction can be grasped, and the landscape garden design concept can be better integrated into the perspective distance-angle shape distribution analysis of the landscape garden. As the central point of the landscape garden perspective distance-angle shape distribution analysis, the design philosophy can grasp people’s thoughts and design the landscape garden works that suit people’s love, and the content of landscape garden design is also more complicated. Life requires a variety of activities. During the design, both the people’s activities and the display of function must be considered and valued, especially the latter. The landscape design of the memorial park not only is limited to the quadratic element but also needs to show three-dimensionally and stereoscopically the environment space capacity to meet the needs of people’s activities.Scientific and detailed investigation and research always follow the basic principles of domestic and foreign landscape architecture plans. This mainly depends on the socially reasonable nature of both landscape architecture planning disciplines. Through reasonable investigation and research of scientific landscape architecture plan, various construction procedures are planned, the data collected from various aspects through on-spot investigation is used effectively to understand the public opinion, and the landscape design of the memorial garden can be made more scientific and realized through the investigation of local humanities and nature, achieving the unity of history and future. Because landscape architecture is a complex system engineering, it needs a scientific and reasonable perspective distance-angle shape distribution, continuously analyzes the various stages of the intervention of each system, clarifies the theme, solves the investigated problems through comprehensive research, and grasps the main contradictions. The correct strategic deployment is put forward by occupying vantage point, making the design of the landscape architecture plan develop in the correct direction. In order to commemorate the landscape design plan in the garden, it is necessary to make a decision based on the comparative method and the positive approach. Through the imagination of the future, if you seek creativity and new ideas, argumentation will play an important role.


## 2.1. The Innovative in the Perspective Distance-Included Angle Shape Distribution of Garden Landscapes

In addition to reflecting rationality, the design of the landscape architecture plan should also emphasize innovation and abide by certain artistic rules in the design. One is the relationship between diversity and unity. Diversity means that when designing landscape gardens, including the build, the amount of the body, the color, the line, the form, the style, and other factors, the above various substances are taken into account so that they are unified and coordinated to form a certain degree of similarity or consistency and make people feel that there is a certain change in the unity. If the ideas of the elements in the design are not enough, it means that there is a change [3–5]. At this time, it makes people feel disorganized and unstructured. Second, grasp the relationship between coordination and comparison. The design of landscape gardens forms objects of different shapes through the grasp and innovation of build, color, line, proportion, virtual reality, empty and full, brightness or darkness, and so on to achieve the purpose of overall coordination. It is related to different sceneries. The third is the relationship between balance and stability. The landscape architecture is being designed, and it is necessary to consider the issue of color. If it is thick, it will be messy. The issue of quantity must also be considered. If it is too numerous, it will not be coordinated. According to the principle of balance, only a reasonable combination of plants of various weights can make it stable. The fourth is the relationship between rhythm and rhythm. The shape, color, and texture of plants can express the rhythm of the landscape. Willow trees need to be meticulous and funny, taking into account the mood and regularity, the effect most suitable for the landscape. The vegetation is arranged alternately to enhance the sense of rhythm.The pavement of landscape gardens is not the main landscape, but the coordination with unreasonable areas, making each area more definite, shape, and pattern are used to set off the environment, to increase the soundness feeling of the landscape garden. In the decorations centered on neutral tones, many colors are bright and not vulgar, but in general, bright colors and the spatial layout of landscape gardens are coordinated with each other, according to visual experience, to enhance the sense of direction and openness of landscape garden space design. After the partial design of the landscape garden is completed, the decoration of carving art can satisfy people’s love and psychological needs by designing flower beds, utensils, flower shelves, stone, vegetation, and so on. Separating the space of landscape gardens can make different scenic spots have distinctive signs. The overall environment of the landscape garden shows its unique artistic conception [6, 7].


## 2.2. The Rationality of Perspective Distance-Included Angle Shape Distribution of Garden Landscapes

The perspective distance-angle shape distribution of the landscape garden can reflect the designer’s layout thought, which is established through the designer’s thought. The design direction can be grasped, and the landscape garden design concept can be better integrated into the perspective distance-angle shape distribution analysis of the landscape garden. As the central point of the landscape garden perspective distance-angle shape distribution analysis, the design philosophy can grasp people’s thoughts and design the landscape garden works that suit people’s love, and the content of landscape garden design is also more complicated. Life requires a variety of activities. During the design, both the people’s activities and the display of function must be considered and valued, especially the latter. The landscape design of the memorial park not only is limited to the quadratic element but also needs to show three-dimensionally and stereoscopically the environment space capacity to meet the needs of people’s activities.Scientific and detailed investigation and research always follow the basic principles of domestic and foreign landscape architecture plans. This mainly depends on the socially reasonable nature of both landscape architecture planning disciplines. Through reasonable investigation and research of scientific landscape architecture plan, various construction procedures are planned, the data collected from various aspects through on-spot investigation is used effectively to understand the public opinion, and the landscape design of the memorial garden can be made more scientific and realized through the investigation of local humanities and nature, achieving the unity of history and future. Because landscape architecture is a complex system engineering, it needs a scientific and reasonable perspective distance-angle shape distribution, continuously analyzes the various stages of the intervention of each system, clarifies the theme, solves the investigated problems through comprehensive research, and grasps the main contradictions. The correct strategic deployment is put forward by occupying vantage point, making the design of the landscape architecture plan develop in the correct direction. In order to commemorate the landscape design plan in the garden, it is necessary to make a decision based on the comparative method and the positive approach. Through the imagination of the future, if you seek creativity and new ideas, argumentation will play an important role.


## 3. Implementation of Retrieval Algorithm Based on Distance-Angle Shape Distribution

### 3.1. Randomly Pick Points on the Model

In view of the calculation goal with model mainly expressed with a triangular grid, the grid model in the triangular face in the 3D CAD model is set asS=T1,T2,…,Tk, with Ti indicating that N random points can be generated on the surface of the 3D CAD model, and the value process at random points is roughly divided into two steps: points are taken randomly on triangular patches Tj and Tj. The 3D CAD model search algorithm is used if the distribution probability of random points in this area is proportional to the area in this area [8–10].First, define a triangular patchT=P1,P2,P3 whose area can be(1)AT=P2−P1×P3−P12.Therefore, the surface area of the 3D CAD model can be expressed as follows:(2)AS=∑i=1kATi.The probability of a triangular patchT selected randomly can be expressed as(3)pTj=ATjAS.As shown in Figure1, the interval [0, 1] can be divided into k segments, where the j-th segment is the same with pTj in value. If a random number is generated between [0, 1], the index number j corresponding to the triangle patch can be obtained.Figure 1
Schematic diagram of triangular patches selected randomly.After selecting the triangle patch, it can be randomly generated on the triangle patch, as shown in Figure2, and the generated [0, 1] interval numbers are r1 and r2. Then, the position of the random point P can be expressed as(4)P=1−r1P1+r11−r2P2+r1r2P3.Figure 2
Schematic diagram of randomly generated points on a triangular patch.While sampling, it is necessary to record the normal vector of each point, and the normal vector of each point is the same as the normal vector of the triangular patch where the point is located. It should be noted that whenr1 = 0, r1 = 1, r2 = 0, r1 = 1, and r2 = 1, the sampling point is exactly the vertex of the triangle, and three cases of r1 = 1, r2 ∈ (0, 1), and R2 = 0, r1 (change 0, 1), r1, r1, r1, r1 ∈ 4 (0, 1) are just sampled to the triangle [11, 12]. At this time, the normal vector of the sampling point can be calculated based on the weighted average of normal vector of the triangle connected to this point. There are n triangles in the set point P. The normal vector of the triangle is denoted as nj, the area is denoted as Ajj=1,2,…,n, and the normal vector of the sampling point P is(5)n=∑j=1nAjnj∑j=1nAj.


### 3.2. Construction of Model Distance-Angle Shape Distribution Map

Suppose the two sampling points areP1x1,y1,z1 and P2x2,y2,z2, respectively, and their normal vectors are, respectively, n1 and n2, as shown in Figure 3.Figure 3
The included angle between the line segment and the normal vector of the endpoint.When the distance between the sample points on the surface of the model is represented by the Euclidean distance, the distance between the sample pointsP2 and P1 is(6)l=x2−x12+y2−y12+z2−z12.For the sampling pointP1, the cosine of the included angle between the directed line segment P1P2 and n1 is(7)cosθ=P1P2⋅n1P1P2×n1.Among them, the value range ofθ in formula (7) is [0, π].While calculating the distance, the minimum and maximum values of the sampling points in each coordinate direction need to be recorded, the two vertices of the model bounding boxPminxmin,ymin,zmin and Pmaxxmax,ymax,zmax can be obtained, and then the diagonal length d of the model bounding box (Figure 4) is(8)d=xmax−xmin2+ymax−ymin2+zmax−zmin2.Figure 4
Calculation of the diagonal length of the bounding box.After the calculation of the distance of the sampling point and the sandwich is completed, the probability distribution of the distance sandwich is represented by a distribution matrix. The specific procedure for constructing the model distance-sandwich distribution matrix is as follows:(1)
According to the calculation, the distanced corresponding to the diagonal of the bounding box can be obtained. The distance d can be divided into n1 parts (n1 = 500), and then dbin=d/n1 can be obtained for each portion.(2)
The included angleθ between the obtained directed line segment and the normal vector is set to [0, π], which can be divided into n2 parts (n2 = 100), and then θbin=π/n2 can be obtained for each portion.(3)
The distanced is considered as the ordinate, with the interval of dbin. θ is considered as the abscissa, with the interval distance of θbin, which forms a two-dimensional grid plane, as shown in Figure 5, and the initial value of each square in the grid plane is 0.(4)
The probability distribution of distance and sandwich is calculated. If the distance and angledk≤di<dk+1 are satisfied and when θm≤θi<θm+1, through the addition of small grids corresponding to the grid surface, the probability distribution of distances and sandwiches can be counted on the two-dimensional grid plane.(5)
Then1 × n2 matrix M is used to represent the grid plane so that the 3D CAD model is represented by the distance-included angle distribution matrix M.Figure 5
The representation of distance-angle distribution matrix representation of the model.The shape distribution map corresponds to the five model distribution matrices. The differences in the geometric shape and topological structure of the five models are clearly reflected in their shape distribution maps, indicating that the models can be effectively distinguished.


### 3.3. Similarity Measurement of Model

The similarity between the 3D CAD models can be used to convert the two distances. In order to accurately represent the matrix difference between the models, the Manhattan distance can be used to evaluate the numerical difference between two adjacent models. Assuming that the distance distribution matrix between modelA and model B is represented by MA and MB in turn, the function used to obtain the similarity measure between model A and model B is expressed as(9)DMA,MB=∑i=1n1∑j=1n2mAij−mBij.The search algorithm of the 3D CAD model is used to improve the perspective distance of landscape architecture under the multimedia background. The specific 3D CAD model search algorithm is a typical 3D CAD model search algorithm. The initial perspective distance obtained based on the perspective distance-sandwich shape distribution algorithm is optimized to the initial value of the 3D CAD model search algorithm. Different nodes of the initial perspective distance are set on pointsS, P1, P2, and so on. Pi1 represents the start node of the road selection line segment, Pi2 represents the end node of the road selection line segment, and any point of the road selection line segment is expressed as follows:(10)Pihi=Pi1+Pi2−Pi1×hi,hi∈0,1,i=1,2,….Then, the length of the perspective distance from the source pointS to the endpoint T can be expressed as(11)L=S,P1h1+∑i=1d−1lengthPihi,Pi+1hi+1+Pdhd,….Different combinations can be represented by using perspective distances of different lengths. Therefore, the best perspective distance value is obtained through the 3D CAD model search algorithm. Suppose the best perspective distance of the garden landscape isR, the corresponding set of elements is D, and Dφi represents its i1≤i≤nth element. Then, variables need to be indicated with h1,h2,…,hd:(12)kζjtDφi=ζjDφi∑i=1nζjDφi,where kζjtDφi indicates the probability value of the t-th ant for judging different estimated values.The adjustment method of ant search is [9](13)ζjDφit+Δ=ζjDφit+ΔζjDφi.The expressionΔζjDφi represents the total number of remaining information elements of the ant passing through all elements φi. The calculation method is as follows:(14)ΔζjDφi=∑kRΔζjkDφi.The above process is performed in a repeated manner until the maximum number of iterations is allowed or all ants obtain a unique element; that is, the optimizedh1,h2,…,hd is obtained.


### 3.4. Pheromone Concentration Update

As time goes by, the ant colony’s exploration process is accompanied by the volatilization of pheromone, so it is necessary to update the pheromone information on the perspective distance reasonably.(15)τijt+1=1−ρτijt+ρτ0.In the formula,τ0 indicates the initial pheromone concentration. ρ represents the pheromone volatilization coefficient.The global pheromone update rule is(16)τijt+1=1−ρτijt+ρΔτi,jt,Δτi,jt=1Lb,where Lb is the length of the best perspective distance.


## 3.1. Randomly Pick Points on the Model

In view of the calculation goal with model mainly expressed with a triangular grid, the grid model in the triangular face in the 3D CAD model is set asS=T1,T2,…,Tk, with Ti indicating that N random points can be generated on the surface of the 3D CAD model, and the value process at random points is roughly divided into two steps: points are taken randomly on triangular patches Tj and Tj. The 3D CAD model search algorithm is used if the distribution probability of random points in this area is proportional to the area in this area [8–10].First, define a triangular patchT=P1,P2,P3 whose area can be(1)AT=P2−P1×P3−P12.Therefore, the surface area of the 3D CAD model can be expressed as follows:(2)AS=∑i=1kATi.The probability of a triangular patchT selected randomly can be expressed as(3)pTj=ATjAS.As shown in Figure1, the interval [0, 1] can be divided into k segments, where the j-th segment is the same with pTj in value. If a random number is generated between [0, 1], the index number j corresponding to the triangle patch can be obtained.Figure 1
Schematic diagram of triangular patches selected randomly.After selecting the triangle patch, it can be randomly generated on the triangle patch, as shown in Figure2, and the generated [0, 1] interval numbers are r1 and r2. Then, the position of the random point P can be expressed as(4)P=1−r1P1+r11−r2P2+r1r2P3.Figure 2
Schematic diagram of randomly generated points on a triangular patch.While sampling, it is necessary to record the normal vector of each point, and the normal vector of each point is the same as the normal vector of the triangular patch where the point is located. It should be noted that whenr1 = 0, r1 = 1, r2 = 0, r1 = 1, and r2 = 1, the sampling point is exactly the vertex of the triangle, and three cases of r1 = 1, r2 ∈ (0, 1), and R2 = 0, r1 (change 0, 1), r1, r1, r1, r1 ∈ 4 (0, 1) are just sampled to the triangle [11, 12]. At this time, the normal vector of the sampling point can be calculated based on the weighted average of normal vector of the triangle connected to this point. There are n triangles in the set point P. The normal vector of the triangle is denoted as nj, the area is denoted as Ajj=1,2,…,n, and the normal vector of the sampling point P is(5)n=∑j=1nAjnj∑j=1nAj.


## 3.2. Construction of Model Distance-Angle Shape Distribution Map

Suppose the two sampling points areP1x1,y1,z1 and P2x2,y2,z2, respectively, and their normal vectors are, respectively, n1 and n2, as shown in Figure 3.Figure 3
The included angle between the line segment and the normal vector of the endpoint.When the distance between the sample points on the surface of the model is represented by the Euclidean distance, the distance between the sample pointsP2 and P1 is(6)l=x2−x12+y2−y12+z2−z12.For the sampling pointP1, the cosine of the included angle between the directed line segment P1P2 and n1 is(7)cosθ=P1P2⋅n1P1P2×n1.Among them, the value range ofθ in formula (7) is [0, π].While calculating the distance, the minimum and maximum values of the sampling points in each coordinate direction need to be recorded, the two vertices of the model bounding boxPminxmin,ymin,zmin and Pmaxxmax,ymax,zmax can be obtained, and then the diagonal length d of the model bounding box (Figure 4) is(8)d=xmax−xmin2+ymax−ymin2+zmax−zmin2.Figure 4
Calculation of the diagonal length of the bounding box.After the calculation of the distance of the sampling point and the sandwich is completed, the probability distribution of the distance sandwich is represented by a distribution matrix. The specific procedure for constructing the model distance-sandwich distribution matrix is as follows:(1)
According to the calculation, the distanced corresponding to the diagonal of the bounding box can be obtained. The distance d can be divided into n1 parts (n1 = 500), and then dbin=d/n1 can be obtained for each portion.(2)
The included angleθ between the obtained directed line segment and the normal vector is set to [0, π], which can be divided into n2 parts (n2 = 100), and then θbin=π/n2 can be obtained for each portion.(3)
The distanced is considered as the ordinate, with the interval of dbin. θ is considered as the abscissa, with the interval distance of θbin, which forms a two-dimensional grid plane, as shown in Figure 5, and the initial value of each square in the grid plane is 0.(4)
The probability distribution of distance and sandwich is calculated. If the distance and angledk≤di<dk+1 are satisfied and when θm≤θi<θm+1, through the addition of small grids corresponding to the grid surface, the probability distribution of distances and sandwiches can be counted on the two-dimensional grid plane.(5)
Then1 × n2 matrix M is used to represent the grid plane so that the 3D CAD model is represented by the distance-included angle distribution matrix M.Figure 5
The representation of distance-angle distribution matrix representation of the model.The shape distribution map corresponds to the five model distribution matrices. The differences in the geometric shape and topological structure of the five models are clearly reflected in their shape distribution maps, indicating that the models can be effectively distinguished.


## 3.3. Similarity Measurement of Model

The similarity between the 3D CAD models can be used to convert the two distances. In order to accurately represent the matrix difference between the models, the Manhattan distance can be used to evaluate the numerical difference between two adjacent models. Assuming that the distance distribution matrix between modelA and model B is represented by MA and MB in turn, the function used to obtain the similarity measure between model A and model B is expressed as(9)DMA,MB=∑i=1n1∑j=1n2mAij−mBij.The search algorithm of the 3D CAD model is used to improve the perspective distance of landscape architecture under the multimedia background. The specific 3D CAD model search algorithm is a typical 3D CAD model search algorithm. The initial perspective distance obtained based on the perspective distance-sandwich shape distribution algorithm is optimized to the initial value of the 3D CAD model search algorithm. Different nodes of the initial perspective distance are set on pointsS, P1, P2, and so on. Pi1 represents the start node of the road selection line segment, Pi2 represents the end node of the road selection line segment, and any point of the road selection line segment is expressed as follows:(10)Pihi=Pi1+Pi2−Pi1×hi,hi∈0,1,i=1,2,….Then, the length of the perspective distance from the source pointS to the endpoint T can be expressed as(11)L=S,P1h1+∑i=1d−1lengthPihi,Pi+1hi+1+Pdhd,….Different combinations can be represented by using perspective distances of different lengths. Therefore, the best perspective distance value is obtained through the 3D CAD model search algorithm. Suppose the best perspective distance of the garden landscape isR, the corresponding set of elements is D, and Dφi represents its i1≤i≤nth element. Then, variables need to be indicated with h1,h2,…,hd:(12)kζjtDφi=ζjDφi∑i=1nζjDφi,where kζjtDφi indicates the probability value of the t-th ant for judging different estimated values.The adjustment method of ant search is [9](13)ζjDφit+Δ=ζjDφit+ΔζjDφi.The expressionΔζjDφi represents the total number of remaining information elements of the ant passing through all elements φi. The calculation method is as follows:(14)ΔζjDφi=∑kRΔζjkDφi.The above process is performed in a repeated manner until the maximum number of iterations is allowed or all ants obtain a unique element; that is, the optimizedh1,h2,…,hd is obtained.


## 3.4. Pheromone Concentration Update

As time goes by, the ant colony’s exploration process is accompanied by the volatilization of pheromone, so it is necessary to update the pheromone information on the perspective distance reasonably.(15)τijt+1=1−ρτijt+ρτ0.In the formula,τ0 indicates the initial pheromone concentration. ρ represents the pheromone volatilization coefficient.The global pheromone update rule is(16)τijt+1=1−ρτijt+ρΔτi,jt,Δτi,jt=1Lb,where Lb is the length of the best perspective distance.


## 4. Garden Landscape Perspective Distance-Angle Shape Distribution Based on 3D CAD Model Retrieval Algorithm

Different from the existing overall shape distribution algorithm, the 3D CAD model retrieval algorithm adopted is adopted in this paper, which fully considers the function of the global statistical shape, and the corresponding area of the random sampling point on the surface of the 3D CAD model can be regarded as an object. According to the distribution of points near the 3D CAD model, the perspective distance-angle shape distribution of the garden landscape can be designed. This model can reflect the analysis of the 3D CAD model retrieval algorithm data information with the sampling point as the center.The general idea of the algorithm here is shown in Figure6. First, a fixed number of sampling points are randomly selected on the surface of the 3D CAD model, and the positioning distance of each sampling point between this point and each other point is calculated [13–15]. All points near the sampling point are found according to the distance measurement to calculate the numerical distribution of the measured distance from the center; the perspective distance model of garden landscape in the district is constructed to show its morphological distribution. Finally, by matching the perspective distance-angle shape distribution of the corresponding garden landscapes of different models, the similarity evaluation between the 3D CAD models is obtained.Figure 6
The overall idea of the garden landscape perspective distance-angle shape distribution analysis algorithm based on the 3D CAD model retrieval algorithm.


### 4.1. Selection of Sampling Points and Calculation of Geodetic Distance

The distance between randomly sampled points is used as the shape function used by the 3D CAD model in this paper. Unlike the traditional Euclidean distance, the distance obtained through the use of the 3D CAD model between two points will always be limited on the model. Therefore, measuring the distance between the models can query the corresponding topology information. Due to the inconsistency between the measured perspective distance-angle shape of the garden landscape and the prediction, the measured distance between the sampling points is obtained based on the 3D CAD model retrieval algorithm, and meanwhile, linear fitting is performed on the calculated results in this paper.P=p1,p2,…,pN indicates the set of sampling points obtained by random sampling on the surface of the 3D CAD model. pi indicates the sampling points in the set. It is necessary to calculate the geodetic distance between pi and the sampling point pj in P. The obtained set is as follows:(17)Di=dispi,pj|j=1,…,N;j≠i.Among them, dis () represents the distance measurement obtained between two points. The 3D CAD model can be used according to their respective sampling points, but the measured distance may not be the same as the predicted value. The main reason is that the numerical value span is large, so theZ-bisect method is used to normalize the measured distance set Di.


### 4.2. The Construction of the Perspective Distance-Angle Shape Distribution of the Garden Landscape

In order to construct the perspective distance-angle shape distribution of the garden landscape, firstly, it is necessary to retrieve other points belonging to the specified sample point in the vicinity of the specified sample point.Definition 1.
The neighborhood of the sampling point: for a given sampling pointpi, its neighborhood is a spherical area centered on pi and geodesic distance r as the radius. 0<r≤dmax is satisfied, where dmax is the geodetic distance between pi and the farthest sampling point in the sampling point set P. r=0.3dmax is taken in this paper, which is most suitable.
All the sampling points located in the area are searched on the surface of the model to calculate the geodetic distance frompi and form the set Di′. Since the set Di′ of geodesic distances between pi and the other points in P has been calculated in the previous section, the acquisition of Di′ only needs to be based on the neighborhood radius r of pi to filter the members in Di.
The numerical distribution of the geodesic distance betweenpi and other sampling points in its neighborhood in the set Di′, thereby constructing the perspective distance-angle shape distribution of garden landscape in the 3D CAD model of the pi neighborhood, is denoted as hi. The interval length of the histogram is defined as(18)b=dmax′−dmin′n.
The maximum and minimum values of the measured distance can be calculated in the formula.n is the interval number of the histogram (in the experiment, n is 32) dmax′, dmin′, Di′, and hi.
The perspective distance-included angle shape distribution of the garden landscape can be obtained by taking the sampling point as the center point of the observation area, and the local shape feature of the perspective distance-included angle of the garden landscape can be extracted using a 3D CAD model. As a histogram, it can be seen as the influence of sampling pointshi in the distance zone on the local shape features of the 3D CAD model. The more different the sampling points pi in the area, the more obvious the shape change of the 3D CAD model. In addition, the local shape corresponding to the sampling points of the 3D CAD model will also decrease as the distance between the observation centers increases, as shown in Figure 7. Take the sampling point pf of the 3D CAD model as the center of the local area. For the sampling points pf in this area, the points pc near the center pi in the garden landscape area can better reflect the perspective distance-angle shape distribution of the 3D CAD model in this area. Therefore, in order to accurately obtain the local feature information under the 3D CAD model, the Gaussian function can be used as the weight corresponding to the local shape histogram hi.(19)hi′x=hix×Gx,σ.
In the formula,σ represents the Gaussian window function parameter and X represents the Gaussian weight corresponding to the component in the histogram interval. Since the point at the end of the sampling point area contributes very weakly to the local shape characteristics, it can be ignored. Therefore, σ = 0.33 is taken in this paper, so the weight corresponding to the component in this position of the local shape histogram is approximated to 0. Figures 7(b) and 7(c) show that the garden landscape perspective distance-angle shape distribution weighted by the Gaussian window function can capture the impact difference of sampling points on the local shape features of the model and can more accurately describe the local shape information of the model.Figure 7
The perspective distance-angle shape distribution of the garden landscape in the 3D CAD model area. (a) An example of the neighborhood of the model sampling point. (b) Before Gaussian weighting (σ=0.33). (c) After Gaussian weighting (σ=033).
(a)(b)(c)


### 4.3. Similarity Calculation

In view of all the sampling points on the surface of the 3D CAD model, to construct the perspective distance-angle shape distribution characteristics of the garden landscape, the 3D CAD model can be expressed as a collection of perspective distance and angle shape distribution of the garden landscape. The calculation efficiency of similarity between different models can be clustered in the histogram under the comparison model, and the histogram of the typical representative can be selected. The typical representative can be selected, and the 3D CAD model search algorithm can be used for similarity matching. Assuming the corresponding histogram groups of modelsA and B, the similarity calculation steps between model A and model B are as follows:Step 1: the 3D CAD model search algorithm is clustered inHA and HB successively, and the histograms HA∗ and HB∗ variables of the center of the T categories are obtained.Step 2: select the memberhiA∗ in HA∗ and find the histogram hjB∗ most similar to it in set HB∗. The distance between hiA∗ and hjB∗ can be calculated according to χ2:(20)dχ2hiA∗,hjB∗=∑xnhiA∗x−mx2mx.Among them,mx=hiA∗x+hjB∗x/2hiA∗x and hiB∗x represent the component of the histogram hiA∗ and hiB∗x on x.Step 3: perform Step 2 again until a matching relationship is established for all members in the two histogram setsHA∗ and HB∗. Then, the similarity between model A and model B can be expressed as(21)SimA,B=1−∑t=1TDt,whereDt is the distance between the histograms of the local shapes that are successfully matched in HA∗ and HB∗.The perspective distance-angle shape distribution of the garden landscape is a kind of directional noncyclic graph that illustrates the probability dependence of variables. The perspective distance-angle shape distribution of the garden landscape formed by sample learning represents a set of conditional independence assumptions. Any endpoint is the combined state of the parents independently and not the end of the offspring. The quality of multimedia visual perception can predict the probability distribution of the random vector of each node and decompose it into the product of the marginal distribution of random variables; namely,(22)Px1,x2,…,xm|B=∏i=1NPxj|πj=∑A−xj∪xiPx1,x2,…,xm∑A−xiPx1,x2,…,xm.In the formula,x1,x2,…,xm represents the attribute node, A=x1,x2,…,xm represents the attribute set, and πi:i=1,2,…,m represents the father node set of node xi.The key to the perspective distance-angle shape distribution of the garden landscape is to estimate the possibility of producing results based on the occurrence of the event, the perspective distance-angle shape distribution of the garden landscape is supported by the existing parameters (probability distribution) of the node, and statistical knowledge on perspective distance-angle shape distribution of garden landscape is applied to calculate the probability of occurrence of events corresponding to related nodes. In other words, the problem is that the valueh of a part of the attribute set H of the attribute set A is known, and the attribute set K of the other part of the attribute set A is the conditional probability P of the specified value k. By comparing the size of P (K = kH = h) of different nodes in the perspective distance-angle shape distribution of the garden landscape, the most likely result or reason can be inferred.The perspective distance-angle shape distribution of the garden landscape is mainly based on the maximum posterior probability to obtain the event hypothesis under known conditions.H is the limited hypothesis space defined in the exemplary space D. For each hypothesis h (i.e., the perspective distance-the angle shape distribution of each garden landscape), the posterior probability of the network can be expressed in D as(23)Ph|D=PD|hPhPD.The perspective distance-angle shape distribution of the garden landscape is to be realized(24)hMAP=argmaxh∈HPh|D.The minimum description lengthLg,D is a measure to illustrate the storage structure information of landscape architecture plans under the multimedia background. G represents all possible structure spaces of the Bayesian network, one of which represents the minimum description length L of the network structure g on the data set D.


## 4.1. Selection of Sampling Points and Calculation of Geodetic Distance

The distance between randomly sampled points is used as the shape function used by the 3D CAD model in this paper. Unlike the traditional Euclidean distance, the distance obtained through the use of the 3D CAD model between two points will always be limited on the model. Therefore, measuring the distance between the models can query the corresponding topology information. Due to the inconsistency between the measured perspective distance-angle shape of the garden landscape and the prediction, the measured distance between the sampling points is obtained based on the 3D CAD model retrieval algorithm, and meanwhile, linear fitting is performed on the calculated results in this paper.P=p1,p2,…,pN indicates the set of sampling points obtained by random sampling on the surface of the 3D CAD model. pi indicates the sampling points in the set. It is necessary to calculate the geodetic distance between pi and the sampling point pj in P. The obtained set is as follows:(17)Di=dispi,pj|j=1,…,N;j≠i.Among them, dis () represents the distance measurement obtained between two points. The 3D CAD model can be used according to their respective sampling points, but the measured distance may not be the same as the predicted value. The main reason is that the numerical value span is large, so theZ-bisect method is used to normalize the measured distance set Di.


## 4.2. The Construction of the Perspective Distance-Angle Shape Distribution of the Garden Landscape

In order to construct the perspective distance-angle shape distribution of the garden landscape, firstly, it is necessary to retrieve other points belonging to the specified sample point in the vicinity of the specified sample point.Definition 1.
The neighborhood of the sampling point: for a given sampling pointpi, its neighborhood is a spherical area centered on pi and geodesic distance r as the radius. 0<r≤dmax is satisfied, where dmax is the geodetic distance between pi and the farthest sampling point in the sampling point set P. r=0.3dmax is taken in this paper, which is most suitable.
All the sampling points located in the area are searched on the surface of the model to calculate the geodetic distance frompi and form the set Di′. Since the set Di′ of geodesic distances between pi and the other points in P has been calculated in the previous section, the acquisition of Di′ only needs to be based on the neighborhood radius r of pi to filter the members in Di.
The numerical distribution of the geodesic distance betweenpi and other sampling points in its neighborhood in the set Di′, thereby constructing the perspective distance-angle shape distribution of garden landscape in the 3D CAD model of the pi neighborhood, is denoted as hi. The interval length of the histogram is defined as(18)b=dmax′−dmin′n.
The maximum and minimum values of the measured distance can be calculated in the formula.n is the interval number of the histogram (in the experiment, n is 32) dmax′, dmin′, Di′, and hi.
The perspective distance-included angle shape distribution of the garden landscape can be obtained by taking the sampling point as the center point of the observation area, and the local shape feature of the perspective distance-included angle of the garden landscape can be extracted using a 3D CAD model. As a histogram, it can be seen as the influence of sampling pointshi in the distance zone on the local shape features of the 3D CAD model. The more different the sampling points pi in the area, the more obvious the shape change of the 3D CAD model. In addition, the local shape corresponding to the sampling points of the 3D CAD model will also decrease as the distance between the observation centers increases, as shown in Figure 7. Take the sampling point pf of the 3D CAD model as the center of the local area. For the sampling points pf in this area, the points pc near the center pi in the garden landscape area can better reflect the perspective distance-angle shape distribution of the 3D CAD model in this area. Therefore, in order to accurately obtain the local feature information under the 3D CAD model, the Gaussian function can be used as the weight corresponding to the local shape histogram hi.(19)hi′x=hix×Gx,σ.
In the formula,σ represents the Gaussian window function parameter and X represents the Gaussian weight corresponding to the component in the histogram interval. Since the point at the end of the sampling point area contributes very weakly to the local shape characteristics, it can be ignored. Therefore, σ = 0.33 is taken in this paper, so the weight corresponding to the component in this position of the local shape histogram is approximated to 0. Figures 7(b) and 7(c) show that the garden landscape perspective distance-angle shape distribution weighted by the Gaussian window function can capture the impact difference of sampling points on the local shape features of the model and can more accurately describe the local shape information of the model.Figure 7
The perspective distance-angle shape distribution of the garden landscape in the 3D CAD model area. (a) An example of the neighborhood of the model sampling point. (b) Before Gaussian weighting (σ=0.33). (c) After Gaussian weighting (σ=033).
(a)(b)(c)


## 4.3. Similarity Calculation

In view of all the sampling points on the surface of the 3D CAD model, to construct the perspective distance-angle shape distribution characteristics of the garden landscape, the 3D CAD model can be expressed as a collection of perspective distance and angle shape distribution of the garden landscape. The calculation efficiency of similarity between different models can be clustered in the histogram under the comparison model, and the histogram of the typical representative can be selected. The typical representative can be selected, and the 3D CAD model search algorithm can be used for similarity matching. Assuming the corresponding histogram groups of modelsA and B, the similarity calculation steps between model A and model B are as follows:Step 1: the 3D CAD model search algorithm is clustered inHA and HB successively, and the histograms HA∗ and HB∗ variables of the center of the T categories are obtained.Step 2: select the memberhiA∗ in HA∗ and find the histogram hjB∗ most similar to it in set HB∗. The distance between hiA∗ and hjB∗ can be calculated according to χ2:(20)dχ2hiA∗,hjB∗=∑xnhiA∗x−mx2mx.Among them,mx=hiA∗x+hjB∗x/2hiA∗x and hiB∗x represent the component of the histogram hiA∗ and hiB∗x on x.Step 3: perform Step 2 again until a matching relationship is established for all members in the two histogram setsHA∗ and HB∗. Then, the similarity between model A and model B can be expressed as(21)SimA,B=1−∑t=1TDt,whereDt is the distance between the histograms of the local shapes that are successfully matched in HA∗ and HB∗.The perspective distance-angle shape distribution of the garden landscape is a kind of directional noncyclic graph that illustrates the probability dependence of variables. The perspective distance-angle shape distribution of the garden landscape formed by sample learning represents a set of conditional independence assumptions. Any endpoint is the combined state of the parents independently and not the end of the offspring. The quality of multimedia visual perception can predict the probability distribution of the random vector of each node and decompose it into the product of the marginal distribution of random variables; namely,(22)Px1,x2,…,xm|B=∏i=1NPxj|πj=∑A−xj∪xiPx1,x2,…,xm∑A−xiPx1,x2,…,xm.In the formula,x1,x2,…,xm represents the attribute node, A=x1,x2,…,xm represents the attribute set, and πi:i=1,2,…,m represents the father node set of node xi.The key to the perspective distance-angle shape distribution of the garden landscape is to estimate the possibility of producing results based on the occurrence of the event, the perspective distance-angle shape distribution of the garden landscape is supported by the existing parameters (probability distribution) of the node, and statistical knowledge on perspective distance-angle shape distribution of garden landscape is applied to calculate the probability of occurrence of events corresponding to related nodes. In other words, the problem is that the valueh of a part of the attribute set H of the attribute set A is known, and the attribute set K of the other part of the attribute set A is the conditional probability P of the specified value k. By comparing the size of P (K = kH = h) of different nodes in the perspective distance-angle shape distribution of the garden landscape, the most likely result or reason can be inferred.The perspective distance-angle shape distribution of the garden landscape is mainly based on the maximum posterior probability to obtain the event hypothesis under known conditions.H is the limited hypothesis space defined in the exemplary space D. For each hypothesis h (i.e., the perspective distance-the angle shape distribution of each garden landscape), the posterior probability of the network can be expressed in D as(23)Ph|D=PD|hPhPD.The perspective distance-angle shape distribution of the garden landscape is to be realized(24)hMAP=argmaxh∈HPh|D.The minimum description lengthLg,D is a measure to illustrate the storage structure information of landscape architecture plans under the multimedia background. G represents all possible structure spaces of the Bayesian network, one of which represents the minimum description length L of the network structure g on the data set D.


## 5. Algorithm Verification and Discussion

ESB model library is used as a database for algorithm testing to verify the effectiveness and practicability of using 3D CAD models in this paper. When determining the sample data, a more accurate description of the 3D CAD model will be obtained for the sample data to be obtained, but the complexity will also increase during the operation. After fully considering the effectiveness and efficiency of the algorithm, the number of random sampling points on the surface of the 3D CAD model can be set to 3000, and the clustering scale can be set to 100.Table1 shows the algorithm of this paper, and the two overall shape distribution algorithms (the SD algorithm of literature [2] and the ND algorithm of literature [4]), and the search results of T-shaped parts class model in ESB of the spherical harmonic algorithm (SH) of literature [9]. The algorithm in this paper shows that, taking into account the similarity of the local details of the model, more accurate search results can be obtained.Table 1
Retrieval results of four algorithms forT-shaped parts model.
Query modelAlgorithmRetrieval result sorting (top 6)①②③④⑤⑥din6304Algorithm in this paperdin6306din6304m20din6304m8din6306_40din6306_90din6306_70SDdin6306din6304m8din306-40din6305m16din6307m16din63O5m10NDdin6306din6304m20din6304m8din6306_4din6306_70din6307m10SHdin6306din6304m20din6304m8din6306_90din6305m20din6307m16In order to fully evaluate the search performance of the algorithm in this paper, two recognized search result evaluation indicators [7] are used to verify the overall search performance of the model in the ESB library and compared with the other three search algorithms. It can be seen from Figure 8 and Table 2 that whether it is the representation of the overall survey rate-targeting curve or the evaluation result of the E metric, the algorithm in this paper is significantly better than the other three search algorithms.Figure 8
Comparison of average recall-precision ratio curves of the four retrieval algorithms.Table 2
Comparison of E-measurement indicators of the four retrieval algorithms.
AlgorithmNr=10Nr=20Nr=32Algorithm in this paper0.4420.4320.356ND algorithm0.3730.3260.367SD algorithm0.2220.1560.177SH algorithm0.3340.3140.289Nr is the number of search results.In order to further verify the effectiveness of the algorithm, Microsoft Visual Studio 2008 is used as a comprehensive development environment. The model in the experiment is taken from the ESB model library developed by Purdue University in the United States [11, 12]. The model includes more than 800 models, including rotating body, prismatic, and thin-walled models.Figure9 shows the retrieval experiment results of T-shaped parts and Motor Bodies models in literature [5], literature [7], and ESB model library. In the T-shaped parts class of the ESB model library, there are 6 models that are most similar to the index model. There are 3 top 9 models in the search results with the algorithm in literature [5], and 6 models are retrieved with the algorithm in literature [7]. However, the order in which the models are configured is wrong. In the algorithm of this specification, all the 6 most similar models are retrieved and ranked in the top 6, respectively, as shown in Table 2. There are 7 models most similar to the index model in the Motor Bodies category of the ESB model library. In the search results of the literature 5 algorithm, there is only one model in the top nine, and 2 models are retrieved with the algorithm in literature [7], ranked in the first and ninth positions, respectively. All the 7 most similar models are retrieved with this algorithm. They are ranked in the top 7, respectively. Figure 9 shows the statistical test of the ESB model library, and the verification and verification rates of the three algorithms are obtained. The PR curve is used to characterize the accuracy and the number of return values. The ideal PR curve of the search result should be a parallel line of 1.0. The curve at the top has high accuracy, indicating better search results.Figure 9
Search results of Motor Bodies category in ESB.As can be seen from the above description, the search performance of this algorithm is better than the other two algorithms. This is to make the algorithm in literature [5] construct the shape distribution map only with the distance between random points. The algorithm classifies the distance based on the angle formed by the arrow and the line segment of the endpoint method and represents the 3D CAD model as three shape distribution maps. But the shape distribution map is still constructed with the distance between random points. In the shape distribution map constructed by this algorithm, the distance between the random points and the angle between the normal vector of the model and the line segment are irrelevant with the position of the model, the configuration posture. Combining distance and sandwich to build a shape distribution map can better reflect the shape characteristics of the model.The time complexity of the algorithm in this paper isOn2, where n is the number of sampling points. 600 points are sampled randomly on the surface of the model for the algorithm in this paper, and the 600 sampling points can achieve a better discrimination effect. The number of random point pairs generated by these points (the number of included angle calculations) is N = 600 × 499, which is lower than the algorithm in literature [5] and the one in literature [7] (523,786 times) (Figure 10). The CPU of the test machine used in the experiment has a memory of 4.00 GB. Table 3 shows the average processing time of three algorithms for a single model, including feature extraction time and feature comparison time. The overall efficiency of the algorithm in this paper is higher than that of the other two algorithms.Figure 10
Comparison of the retrieval efficiency of the three algorithms on the model retrieval in the ESB model library.Table 3
The processing time of the three algorithms for a single model.
AlgorithmFeature extraction time (s)Feature comparison time (s)Algorithm in literature [5]1.0260.0000021Algorithm in literature [7]1.3780.0000037Algorithm in this paper0.7830.0000033


## 6. Discussion

By randomly sampling the surface of the 3D CAD model, the 3D CAD model can be expressed as a matrix formed by distance and angle distribution statistics. The problem of comparing the similarity of the 3D CAD model is transformed into a comparison problem of two distance-angle distribution matrices. Finally, the similarity evaluation of the 3D CAD model is realized by the Manhattan distance measurement method. Because the parameterization of the 3D CAD model is still a complicated problem, there are arbitrary topologies on the 3D surface, and some search methods widely used in two-dimensional images cannot be directly extended to the 3D area. Therefore, from a statistical point of view, searching for statistical features with the ability to divide is the optimal idea to retrieve the 3D CAD model.For the 3D CAD model, the normal vector of the data points in the model plays a very important role in the performance of the model shape, while the normal vector and the model do not need to adjust the position and bearing of the model no matter where the sandwich in the line segment locates in the model. On this basis, a 3D CAD model search method is put forward in this paper, combining distance statistics and sandwich statistics.


## 7. Conclusions

This paper is based on the perspective distance-angle shape distribution analysis method of garden landscape in the 3D CAD model retrieval algorithm proposed in this paper. The 3D CAD model is used to randomly select sampling points in its indication and meanwhile constructs the perspective distance-included angle shape distribution of garden landscape for adjacent sampling points, which can make the 3D CAD model map the perspective distance-included angle shape distribution of garden landscape, combining the similar characteristics between different models, converting it into a 3D CAD model to match the corresponding perspective distance-angle shape distribution similarity. Finally, it is verified by experiments that the algorithm in this paper can effectively reflect the similarity difference in the perspective distance-angle shape distribution of the garden landscape.



---

*Source: 5071930-2022-01-05.xml*