When I took over the preparation of the 3D Geological Modeling System project, I was just a novice amateur programmer, but I was very interested in this project. Regardless of the results, the process of participating in this project was very interesting.
Language selection: C ++. C ++ makes C ++ backward compatible with C and has object-oriented features.
IDE: I was planning to use VC ++ 6.0, Because VC ++ 6.0 is currently the mainstream IDE for 3D visualization development, but it is difficult to use it, in addition, our leaders use C ++ builder. c ++ builder has the advantages of easy-to-use and simple interface creation. Therefore, we chose BCB.
3D graphics library: Open graphics library (OpenGL) is used. As for Open Inventor (OIV), it is not intended to be used for the moment. If OpenGL is better used during development, consider whether to use OIV.
Main difficulties:
(1) Geological 3D modeling method: A geological entity is a complex entity with obvious heterogeneity and is much more complex than a CAD system.
(2) 3D display and interaction of 3D Geological Models: in particular, it is difficult to implement the interaction function.
(3) Processing of massive data: the 3D digital data of the geological body is very huge, and each formation is prone to tens or millions of discrete points.
Top-down objective decomposition ideas:
The 3D Geological Modeling System is a huge software project. If we do not implement the goal decomposition to achieve it gradually, it will be far from being realized. In 1961, the United States formulated a detailed moon landing plan to reach the moon in 1970:
(1) launch a rocket into the atmosphere;
(2) surrounding the Earth;
(3) launch a rocket to surround the moon;
(4) The lunar lander is separated from the rocket and landed on the moon surface;
(5) The Lunar Lander leaves the moon and joins the orbital ship;
(6) return to the earth;
(7) entering the atmosphere;
(8) The return compartment is safe and falls into the sea.
Then, at each stage, the target was further decomposed into smaller targets. In 1969, humans first landed on the moon.
The target decomposition process is as follows:
(1) build a data body of 100x100x100 to achieve multi-layer formation modeling.
Further decomposition:
① Given 100 discrete points at the formation layer, the geological data body is divided into two layers to implement property value interpolation for the two layers respectively.
② Given less than 100 discrete points, the data body boundary is automatically extended.
③ Given more than 100 discrete points, the data body boundary is automatically cropped.
④ Add a ground layer that is not in parallel with the previous formation and divide the geological data into three layers to implement property value interpolation for the three layers respectively.
⑤ Add a ground layer connected to the previous strata, divide the geological data into three layers, and implement property value interpolation for the three layers respectively.
⑥ Implement the geological modeling and property interpolation algorithms for any topological relationship on multiple layers.
(2) build a data body of 100x100x100 to achieve hybrid modeling of formation-fault.
Further decomposition:
① An algorithm for finding the intersection line between a ground plane and a fault plane
② Implement an algorithm for tearing a ground layer based on a pair of intersection lines, and perform Attribute Value Interpolation in blocks.
③ Implement an algorithm for tearing multiple strata based on a pair of intersection lines, and perform Attribute Value Interpolation in blocks.
④ Implement the algorithm of tearing multiple strata based on two pairs of intersection lines, and perform Attribute Value Interpolation in blocks.
⑤ Implement the algorithm of tearing multiple strata based on any number of intersection lines, and perform Attribute Value Interpolation in parts.
(3) build a data body of 10000x10000x10000 to realize hybrid modeling of formation-fault.
Further decomposition:
① Dilute the original data so that the data at each layer is less than or equal to 10000.
② Use the memory ing technology to perform simple operations on data.
③ Re-compile the algorithm in step 2 with the memory ing technology.
(4) 3D geological model display.
(5) 3D Interaction of 3D Geological Models (Real-Time query and modification of models)