A fast triangular surface intersection algorithm and its typical ...

7 downloads 42914 Views 615KB Size Report
Apr 17, 2017 - Typical applications of 3D geological modeling using presented algorithm is ... an effective support in building geological model automatically.
A Fast Triangular Surface Intersection Algorithm and its Typical Geological Applications Wang Wei Professor, State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University e-mail: [email protected]

Sun Liming Ph.D., State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University e-mail: [email protected]

Jin Lingyan Student, School of Earth and Space Sciences, Peking University e-mail: [email protected]

Du Chenchang Student, State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University e-mail: [email protected]

Hu Chuanbo Student, State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University e-mail: [email protected]

ABSTRACT An improved algorithm is presented to resolve intersection related problem of triangular surface in 3D geological modeling and analysis, using a structured data search algorithm to exclude most of nonintersected triangles away from intersecting line efficiently and accurately. And a new improved OBB search tree is built to obtain the intersection quickly; triangles near intersection are reconstructed optimized at last. Typical applications of 3D geological modeling using presented algorithm is researched, including of cutting geological model by parameter plane, faults and stratigraphic intersection and geological region discretization. Practice has proved that the method is fast and reliable by comparing to other several methods, especially has obvious efficiency advantages in surface intersection with large amount of data. And it has grate advantages in 3D geological modeling and analysis in surface intersection issues and providing an effective support in building geological model automatically.

KEYWORDS: triangular surface intersection; structured search; mixed OBB search tree; triangle reconstructed; stratum cut; region discretization

INTRODUCTION Construction of triangulated irregular network (TIN) based on discrete points is an important method currently for expressing geological interfaces and reconstruction 3D geological - 11507 -

Vol. 20 [2015], Bund. 21

11508

models,(Hua Weihua et al. 2006, G. Caumon, 2009). Geological modeling usually require processing spatial complex relationship between geological surfaces, which is a hot issue in geological modeling application and research,(Deng Fei,Wang Rui,et al.2007, J. Qian-ping,2008). Applications of surface intersection mainly contain intersection between geological surfaces, fault and stratum intersection, making section, city and underground engineering, which all need to obtain the spatial position, topology and internal structure of the intersection quickly and accurately, and it is useful for understanding of the region correctly,(A. Bistacchi,et al,2008). With much growing geological data, a rapid and stable triangular surface intersection algorithm is need urgently. An improved method of triangular surface intersection is proposed, which combines structured data search algorithm and improved mixed OBB search tree method to obtain intersection quickly and reconstruct triangles crossed by intersecting lines. The algorithm is then applied to typical practical issues of geological modeling and analysis, including of parametric surface cuts geological model, fault plane intersection and geological region discrete. In order to simplify complex problem, stratum intersection will be reduced triangular surface intersection and the geological surfaces is not self-intersect.

LITERATURE REVIEW Geological surface is usually not generated by computer-aided geometric design (CAGD) tool, it has no argument expression, so CAGD parameters solving method cannot be directly used. If using a loop intersection judgment method, all the triangles will be calculated, resulting in low efficiency of the algorithm to O (n2). Because intersecting triangles are only a small part of all, it is the main factor of impacting the speed. Therefore quickly find intersecting triangles is key point. Currently methods of surface intersection and object collision detection are divided into spatial decomposition and bounding box method. Intersection is obtained by spatial decomposition through recursive dividing surface space, includes octree, Binary Space Partitioning trees ( BSP) and k-dimensional trees (KD), (Carlbom I,et al.1985). Bounding box method is to get intersection by bounding box rather than triangle, includes Axis-Aligned Bounding Box(AABB), Oriented Bounding Box(OBB), K discrete oriented polytope(KDOP),etc(S. Gottschalk,1996, P. Taylor,2012). Currently geological surface intersection(GSI) is mostly used directly object collision detection methods. Lindenbeck developed TRICUT software used widely to solve triangle intersection problem with Triangle library to complete Delaunay triangulation and Rapid library to intersect (C. H. Lindenbeck,2002). OBB bounding box is also extensively used and has achieved good results,(Huang Songbo,et al.2011), but large amount of data is very time-consuming to build hierarchical search tree. Yang Yang has proposed a cutting method for true 3D model based on mixed bounding box(Y. Yang,2010). Ahmed H also proposed a reliable GSI method based on tracking method,(A. H. Elsheikh,2014), which tracks surface intersecting lines by triangulation topological, while it is difficult to find starting track point.

IMPROVED TRIANGULAR SURFACE INTERSECTION METHOD The key of detecting two triangular surfaces intersecting part is to quickly find the triangles intersected. Firstly, intersecting lines are estimated and most independent triangles need to be excluded, because no matter how much the number of triangles, intersecting triangles are only a small number. Constructing search tree directly is inefficient, so removing most non-intersecting triangles quickly and leaving a triangular area near intersecting line firstly, and then building hierarchical search tree, which can greatly enhance the speed. In this paper, a structured data

Vol. 20 [2015], Bund. 21

11509

structure excludes majority of non-intersecting triangles efficiently, and it also build improved OBB search tree quickly and accurately to calculate a final intersecting lines, flow is as Figure 1. Firstly, we use a static structure of the data structure to express a triangular surface, which is using a greater cuboid to express surface,( H. Samet,2006, F. Dassi,2014), then creating a special hierarchical binary search tree, whose roots of all levels are represented based on the triangles’ AABB bounding box and leaf nodes are replaced by OBB bounding box. Finally, it is complete by triangles intersecting. Rough Rough Intersection Intersection Triangluar Triangluar Surface1 Surface1 Approximate Approximate intersection intersection area area Triangluar Triangluar Surface2 Surface2

Structured Structured search search cuboid cuboid

Accurate Accurate Intersecion Intersecion

Triangluar Triangluar Intersection Intersection

OBB OBB Leaf Leaf

AABB AABB Root Root Search Search Tree Tree

Figure 1: Flow diagram of overall method

Structured data search algorithm Define TIN points as V R , triangles as T R , triangular surface in stratum as S R , triangular network as cuboid E R in its 3D Cartesian coordinate system, any point as P ( x, y, z ) , which can be represented by the following expression: E xyz = {x min,y min,z min,x max,y max,z max } (1) Where, Exyz ∈ E R ,

x min = min {x 1, x 2 , ¼ x n } , x max = max {x 1, x 2 , ¼ x n } ymin = min {y1, y2 , ¼ yn } , ymax = max {y1, y2 , ¼ yn } , z min = min {z 1, z 2 , ¼ z n } , z max = max {z 1, z 2 , ¼ z n } . Then cuboid E R is divided into i × j × k same size sub-cuboid El , where in three directions XYZ length is calculated as follows: Lx= > | xk − xm |, Ly= > | yk − ym |, Lz= > | zk − zm | (2) where, K, M is apex of the triangle, the size of sub-cuboid is to ensure that it is larger than majority of triangle bounding box, minimum value is taken as 1.2 times or more appropriate of the average. But for the geological situation, Z direction length is much smaller than length change of XY direction. All sub-cuboids are stored in a one-dimensional array following three directions XYZ loop calculation, so that every sub-cuboid El in entire space E R can be expressed

Vol. 20 [2015], Bund. 21

11510

as ranks number and sub-cuboid’s unique position index in the array can also be calculated by ranks number. index = k 0 ´ i ´ j ´ k + j 0 ´ i ´ j + i0 ´ i (3) Center of triangle bounding box C is introduced, where M ∈ T is triangle corner point: R

= xc

x M max + x M min = , yc 2

y M max + y M min z M max + z M min , zc = 2 2

(4)

S R is expressed by triangle’s center C located in its cuboid, each point in triangles can be uniquely positioned to a cuboid, a triangle may be located on one or more cuboid by XYZ, triangles around the point can be quickly searched by the triangle topology, where each cuboid can have one, more or no triangle(Figure 2). it can calculate the intersecting triangles between the unknown surface and E R by static data structure, and it can also find the nearest triangles collection to another surface quickly (Figure 3). Obviously, this approach still includes many non-intersecting triangles, if it calculates intersection only by this algorithm; efficiency is not very high, so this paper combines improved OBB hierarchical search tree methods to further remove non-intersecting triangles.

Figure 2: Cuboid bounding box of a surface Figure 3: Exclude further non-intersecting triangles

OBB Mixed Search Tree OBB bounding box is a closed bounding box defined as a minimum cuboid containing the object with an arbitrary coordinate axis direction, so it can improve intersect efficiency. But to build a search tree and calculate OBB bounding boxes are more complex and time-consuming than AABB bounding box. Triangular OBB bounding box based on the geometric coordinates needs two more vector calculation, OBB search tree building directly will be inefficient with large amounts of data. In this paper, AABB bounding box is built among all levels of the root, combined with the cuboid bounding box calculated in 2.1. The leaf node is OBB bounding box and binary search tree structure storage is shown in Figure 4. Finally, leaf node’s intersection uses OBB. Advantage of the mix method is to reduce amounts of calculation to speed up the construction pace of the search tree. Hierarchical search tree construction may be obtained from intersecting triangles base on 2.1, briefly as follows:

Vol. 20 [2015], Bund. 21

11511

Select root node. All the triangles are projected onto the bounding box of the largest of the three axes XYZ and find the longest axis, and then select the middle value of this axis max - min mid = 。 2 Build mixed search tree. Select the depth of hierarchical tree, based on the average size of the triangle AABB box. Depth selection of tree is an important factor of search speed intersection, after step 1, triangles intersected are a small part of all, so hierarchy of tree do not require too deep. AABB AABB AABB

OBB

AABB AABB

OBB

OBB

AABB

OBB

OBB

OBB

AABB

OBB

OBB

Figure 4: OBB mix search tree

Recursive subdivision. Traverse each bounding boxes and triangles top-down and store a pointer to corresponding location of the hierarchical nodes, until a single triangle, which is the leaf node with OBB instead of AABB. Intersection. Determine whether the bounding boxes intersect top-down by SAT method, (J. W. Chang,et al,2009, P. Taylor 2012). If recursion to the leaf node, triangle’s OBB intersection according to OBB bounding box built by three points of the triangle.

Intersecting-lines and Regional reconstruction After 2.1 and 2.2, for intersecting triangles, choose a appropriate method. Method proposed by T.Möller method is used to intersect, ( T. Möller, 1997). There are three cases in 3D triangle intersect, points, lines and triangles. The intersection of two triangles is usually line segment (closed ring, multi-line), and then generate intersecting line by start-to-end. Points of intersecting line are added to the intersecting lines on both sides of TIN. This step is done in two-dimensional by rotating to a suitable 2D plane rather than XY projection, ( D. McLaurin,et al.2013). Using a local triangle repair methods, if the crossing point is on the triangle edge, new point is inserted on triangle’s edge to split the edge. If point is inside the triangle, add a new point in the interior, Figure 5 a,and then connect corners to create new triangles, following Delaunay rules (Figure 5 b).

Vol. 20 [2015], Bund. 21

11512

Figure 5: Reconstruction of triangle newly added point from a to b

Figure 6: Multiple geological surface intersection New triangles needs optimize mesh quality mostly. When small triangle topology errors are generated after newly points added, which can’t meets needs of geological model of spatial analysis, classification and numerical assessment, so local modification and reconstruction are needed. Firstly, according to the TIN’s topology, find the triangle around to follow these methods to optimize mesh quality, including edge swap, merger triangles, point reconstruction and inserting new points,( H. Hoppe,1993, M. Attene,2006) . Finally, local reconditioned triangle is transformed back the 3D space again, and the original surface is divided into two surfaces share the boundary. It is done by determining the left and right positions of the other triangular points relative to the intersection and setting triangles respectively to two new surfaces last (Figure 6).

RESULTS AND DISCUSSION Comparative Experiment Result Efficiency of algorithm proposed is tested using an Intel i3-2330M computer with 2.1G CPU and 6G memory, comparing with other two methods, AABB and spatial decomposition by different amount of data, the original geological points is merged by sections, seismic data and

Vol. 20 [2015], Bund. 21

11513

drill holes, for better test, more points is needed to interpolate, result is as Figure 7. Speed of static data search structure has little relationship with the number of triangles and bounding box, for time complexity is O (2n). 600

Time(s)

500

AABB

400

Spatial decomposition

300

Improved algorithm

200 100 0

0.04

0.4

4

20

40

80

160

Triangles(104)

Figure 7: efficiency comparison of three kind method of intersection This ensures that the numbers of triangles used to construct the mixed OBB search tree will not rapid increase with massive triangles; it shows a steady growth trend. The figure 7 shows that the proposed method has efficiency advantages in the large amounts of surface triangles intersection.

ALGORITHM AND ITS APPLICATION IN GEOLOGY Due to spatial relationship between geological surfaces is usually complex, in modeling, stratigraphic intersects fault, it often needs to intersect and discrete, (Z. Bo, 2010). the most common method is arbitrary cross-section cutting when analyzing. Based on proposed algorithm, it can be well applied to geological modeling and analysis automatically, three examples are shown following.

Parameter Plane Cutting Geological Model When building geological model, stratum intersects faults, after modeling, it needs to generate arbitrary cross-section. Projecting curve onto 2D XY plane cannot meet complex cases, such as ring cutting-line and Z direction cutting-line. Normal faults and reverse faults are usually to build the fault plane firstly. Simple fault plane is usually the parameter plane which is easy to get from multiple fault points or pick on user’s real-time interaction, plane’s mathematical expression is as: (5) ax + by + cz + d = 0 Lines defined by planes and six sides of bounding box are calculated by algebra method. The six planes, x = xmax , x = xmin , y = ymax , y = ymin , z = z max , z = zmin , respectively intersect with plane defined by formula(5), three or four intersection line will be gained(Figure 8). Intersection points ABCD will be calculated after that, which also needs to consider calculation tolerance. The polygonal surface will be created by connecting intersection points, which will be intersected with geological surfaces according to method in this paper (Figure 9).

Vol. 20 [2015], Bund. 21

Figure 8: Parameter plane cut bounding box

11514

Figure 9: Parameter plane cut stratum

Fault Surface Intersection In 3D geological modeling, model with fault is a hot research. Usual process is to determine the fault point, fault displacement and angle according to geological cross-section map. To construct the initial fault plane, reconstruct intersection line between existing plane and geological surface to ensure data consistency is needed, The key is to check the correctness of topology and data consistency.(Figure 10).

Figure 10: Fault and model construction

Discrete Geological Region There are many crossing interface in complex geological structure. Different regions are divided by line segments. For the needs of automatic model reconstruction and model numerical analysis, it is cumbersome and unreliable to separate of different regional divided by intersecting lines using manual methods. In order to separate different regions automatically, the intersection algorithm is improved to deal with simple discrete issues. Firstly intersection type needs to be determined, and generate an inner ring according to surface boundary and intersection lines by tracking (Figure 11). Tracking needs to be end at boundary triangles, which will create two adjacent polygons enclosed areas. Then, it complete discrete geological regions by dividing all the triangles into area which they belong according to the polygons according to the relative position of the triangle and intersecting lines.

Vol. 20 [2015], Bund. 21

11515

Figure 11: Geology region discretization

CONCLUSIONS In order to solve the triangular surface intersection problem in 3D geological modeling and analyzing, An improved intersection method based on the combination of the structured data search algorithm using static data structures and mixed OBB tree was proposed. Through structured search, it can fast exclude most of triangles stay away from the intersection. Combined with mixed OBB search tree, it can gain intersecting line of triangle surfaces efficiently. And approach was applied to geological modeling and analysis to prove the reliability and practicality of the algorithm Compared with other conventional methods, it has the following characteristics: 1) Combination of static data search structure and mixed OBB search tree enhances efficiency of the intersection algorithm greatly. In addition to triangular surface, it can easily be extended to other types of surface, like rectangle. 2) Algorithm is applied to geology, solving problems of geological parameters cutting surface geological model, building fault and regional discretization. 3) Through applied to 3D geological model technology and analysis, which provides a new method for modeling and analyzing automatically. Triangular surface intersection algorithm proposed gives a better solution for GSI related issues. GPU parallel computing can be used to enhance the operational efficiency of the method in the future. Also it solves GSI related to application issues and makes workflow automatically and reduces manual intervention, which is the main direction of future efforts.

ACKNOWLEDGEMENT This research was supported by a grant from the National High Technology Research and Development Program of China (863 Program, No. 2013AA01A608) .

Vol. 20 [2015], Bund. 21

11516

REFERENCES 1. A. Bistacchi, M. Massironi, G. V. Dal Piaz, G. Dal Piaz, B. Monopoli, A. Schiavo, and G. Toffolon, (2008). 3D fold and fault reconstruction with an uncertainty model: An example from an Alpine tunnel case study[J]. Comput. Geosci. 34(4): 351–372. 2. A. H. Elsheikh and M. Elsheikh, (2014). A reliable triangular mesh intersection algorithm and its application in geological modeling[J], Engineering with Computers. 30():143–157. 3. Carlbom I, Chakravarty I, Vanderschel D,(1985). A hierarchical data structure for representing the spatial decomposition of 3D objects[M],Frontiers in Computer Graphics. Springer Japan, 2-12. 4. C. H. Lindenbeck, H. D. Ebert, H. Ulmer, L. Pallozzi Lavorante, and R. Pflug, (2002). TRICUT: a program to clip triangle meshes using the rapid and triangle libraries and the visualization toolkit, Comput. Geosci. 28(7):841–850.

5. Deng Fei,Wang Rui,Wang Meiping,et al. (2007). Research and realization of complex three dimensional stratum modeling and fast ray tracing [J]. Petroleum Geology and Oilfield Development in Daqing, 26(1): 113–118. 6. D. McLaurin, D. Marcum, M. Remotigue, and E. Blades, (2013). Repairing unstructured triangular mesh intersections[J], International Journal for Numerical Methods in Engineering, 93( 3): 266–27. 7. F. Dassi, S. Perotto, L. Formaggia, and P. Ruffo,(2014). Efficient geometric reconstruction of complex geological structures[J], Mathematics and Computers in Simulation. 106():163–184.

8. F. Zhigang, J. Jianxun, X. Jie, and W. Xiaochi, (2010). Efficient collision detection using bounding volume hierarchies of OBB-AABBs and its application[C], Computer Design and Applications (ICCDA), International Conference on, 2010. 9. G. Caumon, P. Collon-Drouaillet, C. Le Carlier de Veslud, S. Viseur, and J. Sausse, (2009). Surface-Based 3D Modeling of Geological Structures[J]. Math. Geosci. 41(8): 927–945. 10. H. Samet, Foundations of multidimensional and metric data structures[M]. Morgan Kaufmann, 2006. 11. H. Hoppe, T. DeRose, T. Duchamp, J. McDonald, W. Stuetzle,(1993). Mesh Optimization[C], Proceedings of the 20th Annual Conference on Computer Graphics and Interactive Techniques. 12. Huang Songbo,Xu Hua,(2011).Surface intersection algorithm based on dynamic OBB hierarchy [J].Application Research of Computers. 28(8):3181-3184. 13. Hua Weihua, Deng Weiping, Liu Xiuguo,et al. (2006). Improved Partition Algorithm between Trianglulated Irregular Network[J]. Earth Science-Journal of China University of Geosciences, 31(5):619-623.

Vol. 20 [2015], Bund. 21

11517

14. J. Qian-ping, T. Jie, Y. Chun-feng, (2008).Fast Triangle Mesh Surface Intersection Algorithm Based on Uniform Grid[J], Compuer Engineering.34(21):172–174. 15. J. W. Chang and M. S. Kim,(2009). Efficient triangle-triangle intersection test for OBB-based collision detection[J], Computer Graphic. 33(3): 235–240. 16. M. Attene and B. Falcidieno(2006), ReMESH: An interactive environment to edit and repair triangle meshes[C], Shape Modeling and Applications. SMI 2006. IEEE International Conference. 17. P. Taylor and G. Van Den Bergen, (2012). Efficient Collision Detection of Complex Deformable Models using AABB Trees Efficient Collision Detection of Complex Deformable Models using AABB Trees[J], Journal of Graphics Tools. 2(4):37–41. 18. S. Gottschalk, S. Gottschalk, M. C. Lin, M. C. Lin, D. Manocha, and D. Manocha,(1996). OBB Tree: A Hierarchical Structure for Rapid Interference Detection[C], 96 Proceedings of the 23rd annual conference on Computer graphics and interactive techniques. 19. T. Möller, (1997), A fast triangle-triangle intersection test[J], Journal of graphics tools, 1997, 2(2): 25–30. 20. Y. Yang, B. Zhou, X. Liu, and B. Jin, The research of 3D GIS section for the true three-dimensional Geo-spatial Model[C], 2010 International Conference on Multimedia Technology, ICMT, 2010. 21. Z. Bo,(2010). The Research of 3D GIS Section for The True Three-dimensional Geospatial Model[C], 2010 International Conference on Multimedia Technology,IEEE.

© 2015 ejge

Suggest Documents