Geologic body texture mapping method along occurrence based on spherical parameterization
Through the method based on spherical parameterization, the domain surface average normal vector and rotation matrix of the geological body model are calculated, and iterative calculations and spherical mapping are performed, which solves the problems of cumbersome texture map operations and texture distortion in the existing technology, and achieves efficient and concise texture map effect.
Patent Information
- Application Number
- CN202510076556.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-17
- Publication Date
- 2025-05-02
AI Technical Summary
In the existing three-dimensional modeling technology of geological bodies, the texture mapping method is cumbersome to operate, making it difficult to effectively constrain the direction of the texture, resulting in unsatisfactory texture effect. Especially in complex geological bodies models, multiple cuts are required to cause texture distortion.
The geological body along the production texture map method based on spherical parameterization is adopted. By calculating the domain surface average normal vector of each face of the model, the normal vector rotation matrix is calculated using Rodrigue's rotation formula, the new coordinates of the mesh vertices are iteratively calculated, and the spherical surfaces are mapped. Hemispherical texture mapping based on area constraints is used to calculate the texture coordinates and constrain them.
It greatly reduces texture distortion caused by cutting and stitching operations, simplifies the calculation of texture coordinates, can effectively control the direction of model texture, and is suitable for any model surface with deficiencies, avoiding the processing of the model surface to become a zero-deficiency surface.
Smart Images

Figure CN119919562A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of geological three-dimensional modeling, and in particular to a geological body along-occurrence texture mapping method based on spherical parameterization. Background Art
[0002] The construction of 3D geological models is crucial for understanding and predicting underground structures. With the rapid development of 3D visualization technology in recent years, geological modeling technology has become more mature, and more and more modeling software has appeared on the market. However, current researchers are too focused on geological modeling technology and lack research on 3D geological texture mapping.
[0003] In the past, the common geological body texture mapping method was based on segmentation and surface parameterization. The model surface was cut and partitioned, and then the texture coordinates were calculated through surface parameterization. After mapping each partition, they were stitched together. Common mesh model segmentation algorithms include feature curve-based mesh segmentation algorithms, energy optimization and surface feature-based three-dimensional mesh model segmentation methods, etc. Common surface parameterization methods include harmonic mapping, centroid mapping, etc. The previous methods were cumbersome to operate. For complex geological bodies, the surface needed to be cut multiple times, and the texture at the stitching was inevitably distorted, resulting in an unsatisfactory overall mapping effect. In addition, since it was a texture mapping based on partitions, it was difficult to constrain the texture orientation according to the geological body occurrence information. Summary of the invention
[0004] In view of the above problems, the present invention is proposed to provide a method for texture mapping along the attitude of a geological body based on spherical parameterization, which overcomes the above problems or at least partially solves the above problems.
[0005] In order to solve the above technical problems, the embodiments of the present application disclose the following technical solutions:
[0006] In a first aspect, an embodiment of the present invention discloses a method for texture mapping along the occurrence of a geological body based on spherical parameterization, comprising:
[0007] S100. Inputting the model surface data and the maximum number of iterations, and calculating the average normal vector of each surface of the model;
[0008] S200. Based on the normal vector of the triangular face and the average normal vector of the domain face, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodriguez rotation formula to obtain the rotation matrix related to the normal vector of the triangular face and the average normal vector of the domain face and each face;
[0009] S300. Based on the rotation matrix, calculate new coordinates of the mesh vertices;
[0010] S400. Iterate S100-S300 to determine whether the current number of iterations is greater than the maximum number of iterations. If it is greater than the maximum number of iterations, map the spherical surface of the model;
[0011] S500. When the spherical mapping of the model is completed, the left and right hemispheres of the sphere are respectively subjected to hemispherical texture mapping based on area constraints to calculate the model texture coordinates;
[0012] S600: After the model texture coordinates are calculated, constrain the model texture.
[0013] Furthermore, in S100, the domain surface average normal vector of each surface of the model is calculated, and the calculation formula is:
[0014] l a =(1+e -2.7 )S(3 <n i ,n * >-0.3) (1)
[0015]
[0016] in, is the sum of the k-order domain triangle normal vectors of each triangle in the triangulated network model, μ is a fixed weight, and n * is the average normal vector of the entire model, k is taken by default N f is the total number of triangle faces of the model, S(x) is the Sigmoid function, is the sum of the Gaussian curvatures of all points in the model where the Gaussian curvature is negative.
[0017] Further, in S200, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodrigues rotation formula to obtain the rotation matrix between the normal vector of the triangular face and the average normal vector of the domain face and each face. The Rodrigues rotation formula is:
[0018] R=I+sin(θ)K+(1-cos(θ))K 2 (4)
[0019]
[0020] Among them, formula 4 is the Rodriguez rotation formula, formula 5 is the formula for the composition of matrix K, and vector k is the triangle normal vector and its domain average normal vector The cross product of .
[0021] Further, in S300, based on the rotation matrix, the new coordinates of the mesh vertices are calculated. The specific method includes: calculating the new coordinates of the mesh vertices by the equation group Lv′=b, where v′ is the new coordinate of the vertex, the matrix L is an N*N matrix, N is the total number of model vertices, and the matrix L is formed as Formula 6, v j ~v i Indicates v j With v i Adjacent, α ij With α ji Indicates the two angles opposite to the side ij in two triangles with a common side ij. The value on the diagonal of the matrix L is v i The inverse of the sum of the weight values of the first-order domain points. Matrix b is an N*3 matrix. Matrix b is constructed as Formula 7, where R ij With R ji Represents the rotation matrix of two triangles with common side ij;
[0022]
[0023] Furthermore, in S400, the spherical surface of the model is mapped, and the specific method includes: constructing an outer sphere with the center of mass of the model after the iteration as the center of the circle and the maximum distance of the vertex from the center of mass as the radius, mapping each vertex on the model surface to the outer sphere, and taking the intersection of the ray starting from the center of mass and passing through a point V on the model surface and the surface of the outer sphere as the new coordinate of the vertex V.
[0024] Further, in S500, the left and right hemispheres of the spherical surface are respectively subjected to hemispherical texture mapping based on area constraints to calculate the model texture coordinates. The specific method includes: mapping a circular texture area with a radius of r≤1.0 to the spherical crown surface of a unit sphere with an azimuth angle ψ≤π / 2. When r=1.0, the texture mapping of the unit circle covers the entire hemisphere. When the mapping is completed, r=1.0, ψ=π / 2, S1=πr 2 =π, S1=2πr(r-rcosψ)=2π, S1 and S2 are the corresponding area of the texture plane and the hemisphere before and after mapping, that is, S1=2S2. The constraint relationship S1=2S2 is used to obtain the relationship between the radius r and the azimuth angle ψ. Based on the relationship between the radius r and the azimuth angle ψ, the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained.
[0025] Further, the relationship between the radius r and the azimuth angle ψ is obtained by using the constraint relationship S1=2S2, and the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained based on the relationship between the radius r and the azimuth angle ψ. The specific method includes: the relationship between the radius r and the azimuth angle ψ is formula 8, and formula 8 is simplified to obtain formula 9, and the polar angle α of the texture plane point Q before mapping is equal to the longitude θ of the hemisphere point P after mapping, and finally the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained. Formula 10;
[0026]
[0027] Furthermore, in S600, after the model texture coordinates are calculated, the model texture is constrained. The specific method includes: when using SVG to create the model surface texture, the SVG vector graphic is first rendered as a PNG bitmap image and then attached to the model surface. By implementing the texture calculation steps of S100-S500, the SVG vector graphic is rotated at a specific angle and finally mapped to the model surface to achieve the expected angle of the model surface texture.
[0028] In a second aspect, an embodiment of the present invention discloses an electronic device, including:
[0029] one or more processors;
[0030] A memory for storing one or more programs;
[0031] When the one or more programs are executed by the one or more processors, the one or more processors implement the geological body along-attitude texture mapping method.
[0032] The beneficial effects of the above technical solution provided by the embodiment of the present invention include at least:
[0033] The present invention discloses a method for texture mapping along the attitude of a geological body based on spherical parameterization, comprising: S100. Inputting model surface data and a maximum number of iterations, and calculating the domain surface average normal vector of each face of the model; S200. Based on the normal vector of the triangular face and the domain surface average normal vector, using the Rodrigues rotation formula to calculate the rotation between the normal vector of the triangular face and the domain surface average normal vector, and obtaining the rotation matrix related to the normal vector of the triangular face and the domain surface average normal vector and each face; S300. Based on the rotation matrix, calculating the new coordinates of the grid vertices; S400. Iterating S100-S300, judging whether the current number of iterations is greater than the maximum number of iterations, if it is greater than the maximum number of iterations, mapping the spherical surface of the model; S500. When the spherical surface mapping of the model is completed, using hemispherical texture mapping based on area constraints for the left and right hemispheres of the spherical surface, respectively, to calculate the model texture coordinates;
[0034] Compared with the texture mapping method based on model segmentation and surface parameterization, the geological body along the occurrence texture mapping method proposed by the present invention solves the problems of cumbersome operation, multiple cuttings are required for complex geological bodies, resulting in large texture distortion, and difficulty in controlling the texture direction of the entire model due to cutting and partitioning. The present invention does not need to segment the model, which greatly reduces the texture distortion caused by cutting and stitching operations; because the calculation of texture coordinates adopts hemispherical texture mapping based on area constraints for the left and right hemispheres respectively, only the texture direction relationship of the two hemispheres needs to be processed, which is simple and fast; the method is also applicable to model surfaces with arbitrary defects, and there is no need to process the model surface into a zero-defect surface as in the previous method.
[0035] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0037] Figure 1 This is a flow chart of a method for texture mapping of geological bodies along the occurrence based on spherical parameterization in Example 1 of the present invention;
[0038] Figure 2 This is a schematic diagram of the original model in Example 1 of the present invention;
[0039] Figure 3 This is a schematic diagram of a model after iteration in Example 1 of the present invention;
[0040] Figure 4 This is a schematic diagram of a model after spherical mapping in Example 1 of the present invention;
[0041] Figure 5 This is a schematic diagram of the structure of an electronic device in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0042] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0043] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a method for texture mapping along the occurrence of a geological body based on spherical parameterization.
[0044] Example 1
[0045] The present invention discloses a method for texture mapping of geological bodies along the occurrence based on spherical parameterization, such as Figure 1 ,include:
[0046] S100. Inputting the model surface data and the maximum number of iterations, and calculating the average normal vector of each surface of the model;
[0047] In S100 of this embodiment, the domain surface average normal vector of each surface of the model is calculated, and the calculation formula is:
[0048] l a =(1+e -2.7 )S(3 <n i ,n * >-0.3) (1)
[0049]
[0050] in, is the sum of the k-order domain triangle normal vectors of each triangle in the triangulated mesh model. The normal vector of a single triangle is obtained by making a cross product of any two side vectors. μ is a fixed weight, and n * is the average normal vector of the entire model, k is taken by default N f is the total number of triangle faces of the model, S(x) is the Sigmoid function, is the sum of the Gaussian curvatures of all points in the model where the Gaussian curvature is negative.
[0051] Specifically, in computer graphics and computational geometry, the domain surface average normal vector refers to the average value of normal vectors calculated based on the neighborhood of a face (e.g., adjacent faces) in a three-dimensional model. This calculation is usually used for tasks such as surface smoothing, normal calculation, and mesh optimization. In this embodiment, the process of calculating the domain surface average normal vector of each face of the model includes the following steps:
[0052] Calculate the normal vector of each face and get the normal vector of each face through the vertex cross product.
[0053] Define neighboring faces by determining which edges each face shares with other faces.
[0054] Calculate the sum of the normal vectors of the domain surface, traverse the normal vectors of the neighboring surfaces and sum them.
[0055] Compute the average normal vector, either by summing them up or using a weighted average.
[0056] Normalization, normalize the average normal vector to the unit normal vector.
[0057] Calculating the average normal vector of a domain surface is a common operation in computer graphics and geometry processing, especially in mesh surface processing. Through the above steps, the average normal vector of each face and its neighborhood can be calculated, thus providing a basis for subsequent modeling.
[0058] S200. Based on the normal vector of the triangular face and the average normal vector of the domain face, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodriguez rotation formula to obtain the rotation matrix related to the normal vector of the triangular face and the average normal vector of the domain face and each face;
[0059] In S200 of this embodiment, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodrigues rotation formula to obtain the rotation matrix between the normal vector of the triangular face and the average normal vector of the domain face and each face. The Rodrigues rotation formula is:
[0060] R=I+sin(θ)K+(1-cos(θ))K 2 (4)
[0061]
[0062] Among them, formula 4 is the Rodriguez rotation formula, formula 5 is the formula for the composition of matrix K, and vector k is the triangle normal vector and its domain average normal vector The cross product of .
[0063] Specifically, the Rodrigues' rotation formula is a formula for calculating a new vector obtained by rotating a vector around a rotation axis by a given angle in three-dimensional space. The Rodrigues' rotation formula is widely used in the fields of spatial analytic geometry and computer graphics, and has become a basic calculation formula for rigid body motion. In computer graphics, it is usually used to fill in the rotation matrix to realize vector rotation in three-dimensional space.
[0064] In this embodiment, the Rodriguez rotation formula is used to calculate the rotation between the normal vector of the triangle face and the average normal vector of the domain face. The specific steps include:
[0065] Calculate the normal vector of the triangle face and get the normal vector of the triangle face through the vertex cross product.
[0066] Calculate the average normal vector of the domain surface by taking the weighted average of the normal vectors of the neighboring surfaces.
[0067] Use Rodrigues' rotation formula to rotate, and use the rotation relationship between the original normal vector and the average normal vector of the domain surface to rotate using Rodrigues' rotation formula.
[0068] Find the rotation matrix, construct the antisymmetric matrix of the rotation axis, calculate the rotation matrix, and obtain the matrix form of the rotation operation.
[0069] Through S200 of this embodiment, the rotation between the normal vector of the triangle surface and the average normal vector of the domain surface can be obtained, and the corresponding rotation matrix can be obtained, providing a basis for subsequent steps.
[0070] S300. Based on the rotation matrix, the new coordinates of the mesh vertices are calculated; in S300 of the present embodiment, based on the rotation matrix, the new coordinates of the mesh vertices are calculated, and the specific method includes: calculating the new coordinates of the mesh vertices by the equation group Lv′=b, where v′ is the new coordinate of the vertex, the matrix L is an N*N matrix, N is the total number of model vertices, and the matrix L is formed as formula 6, v j ~v i Indicates v j With v i Adjacent, α ij With α ji Indicates the two angles opposite to the side ij in two triangles with a common side ij. The value on the diagonal of the matrix L is v i The inverse of the sum of the weight values of the first-order domain points. Matrix b is an N*3 matrix. Matrix b is constructed as formula 7, where R ij With R ji Represents the rotation matrix of two triangles with common side ij;
[0071]
[0072] S400. Iterate S100-S300 to determine whether the current number of iterations is greater than the maximum number of iterations. If so, map the spherical surface of the model. In S400 of the present embodiment, map the spherical surface of the model. The specific method includes: constructing an outer sphere with the center of mass of the model after the iteration as the center of the circle and the maximum distance of the vertex from the center of mass as the radius, mapping each vertex on the model surface to the outer sphere, and taking the intersection of the ray starting from the center of mass and passing through a point V on the model surface and the surface of the outer sphere as the new coordinate of the vertex V.
[0073] Specifically, after multiple iterations of S100-S300, the surface of the mesh model is now approximately a sphere. In order to facilitate the calculation of texture coordinates, an outer sphere is constructed with the center of mass of the model as the center of the circle and the maximum distance between the vertex and the center of mass as the radius. The vertices on the model surface are mapped to the outer sphere, and the intersection of the ray starting from the center of mass and passing through a point V on the model surface and the surface of the outer sphere is used as the new coordinate of vertex V.
[0074] Specifically, Figure 2-4 As shown, Figure 2is the original model. After multiple iterations of S100-S300, we get Figure 3 Model, Figure 3 After step S400, the model is obtained Figure 4 The model after spherical mapping.
[0075] S500. When the spherical mapping of the model is completed, the left and right hemispheres of the sphere are respectively subjected to hemispherical texture mapping based on area constraints to calculate the model texture coordinates;
[0076] In S500 of this embodiment, hemispherical texture mapping based on area constraint is adopted for the left and right hemispheres of the spherical surface respectively to calculate the model texture coordinates. The specific method includes: mapping a circular texture area with a radius of r≤1.0 to the spherical cap surface of a unit sphere with an azimuth angle ψ≤π / 2. When r=1.0, the texture mapping of the unit circle covers the entire hemispherical surface. When the mapping is completed, r=1.0, ψ=π / 2, S1=πr 2 =π, S1=2πr(r-rcosψ)=2π, S1 and S2 are the corresponding area of the texture plane and the hemisphere before and after mapping, that is, S1=2S2. The constraint relationship S1=2S2 is used to obtain the relationship between the radius r and the azimuth angle ψ. Based on the relationship between the radius r and the azimuth angle ψ, the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained.
[0077] In some preferred embodiments, the relationship between the radius r and the azimuth angle ψ is obtained by using the constraint relationship S1=2S2, and the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained based on the relationship between the radius r and the azimuth angle ψ. The specific method includes: the relationship between the radius r and the azimuth angle ψ is formula 8, and formula 8 is simplified to obtain formula 9, and the polar angle α of the texture plane point Q before mapping is equal to the longitude θ of the hemisphere point P after mapping, and finally the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained. Formula 10;
[0078]
[0079]
[0080] S600. After the model texture coordinates are calculated, the model texture is constrained. Specifically, in order to clearly see the change in texture direction, when using SVG to create the model surface texture, the SVG vector graphics are first rendered as PNG bitmap images and then attached to the model surface. By first implementing the texture calculation steps of S100-S500 above, then rotating the SVG vector graphics at a specific angle, and finally mapping it to the model surface, the model surface texture presents the expected angle direction.
[0081] The present embodiment discloses a method for texture mapping along the attitude of a geological body based on spherical parameterization, comprising: S100. Inputting model surface data and a maximum number of iterations, and calculating the domain surface average normal vector of each face of the model; S200. Based on the normal vector of the triangular face and the domain surface average normal vector, using the Rodrigues rotation formula to calculate the rotation between the normal vector of the triangular face and the domain surface average normal vector, and obtaining the rotation matrix related to the normal vector of the triangular face and the domain surface average normal vector and each face; S300. Based on the rotation matrix, calculating the new coordinates of the mesh vertices; S400. Iterating S100-S300, judging whether the current number of iterations is greater than the maximum number of iterations, if it is greater than the maximum number of iterations, mapping the spherical surface of the model; S500. When the spherical surface mapping of the model is completed, using hemispherical texture mapping based on area constraints for the left and right hemispheres of the spherical surface, respectively, to calculate the model texture coordinates;
[0082] Compared with the texture mapping method based on model segmentation and surface parameterization, the geological body along the occurrence texture mapping method proposed in this embodiment solves the problems of cumbersome operation, multiple cutting for complex geological bodies, resulting in large texture distortion, and difficulty in controlling the texture direction of the entire model due to cutting and partitioning. The present invention does not need to segment the model, which greatly reduces the texture distortion caused by cutting and stitching operations; because the calculation of texture coordinates adopts hemispherical texture mapping based on area constraints for the left and right hemispheres respectively, only the texture direction relationship of the two hemispheres needs to be processed, which is simple and fast; the method is also applicable to model surfaces with arbitrary defects, and there is no need to process the model surface into a zero-defect surface as in the previous method.
[0083] Example 2
[0084] Based on the same inventive concept, an embodiment of the present disclosure also provides an electronic device. Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Figure 5 As shown, an embodiment of the present disclosure provides an electronic device including: one or more processors 101, a memory 102, and one or more I / O interfaces 103. The memory 102 stores one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement any optimization method in the above embodiments; the one or more I / O interfaces 103 are connected between the processor and the memory, and are configured to implement information interaction between the processor and the memory.
[0085] Among them, the processor 101 is a device with data processing capabilities, including but not limited to a central processing unit (CPU), etc.; the memory 102 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 103 is connected between the processor 101 and the memory 102, and can realize information interaction between the processor 101 and the memory 102, including but not limited to a data bus (Bus), etc.
[0086] In some embodiments, the processor 101 , the memory 102 , and the I / O interface 103 are connected to each other via a bus 104 , and further connected to other components of the computing device.
[0087] In some embodiments, the one or more processors 101 include a field programmable gate array.
[0088] According to an embodiment of the present disclosure, a computer-readable medium is further provided, wherein a computer program is stored on the computer-readable medium, wherein when the program is executed by a processor, the steps in any optimization method in the above-mentioned embodiment are implemented.
[0089] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims present the elements of the various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0090] In the above detailed description, various features are grouped together in a single embodiment to simplify the disclosure. This method of disclosure should not be interpreted as reflecting an intention that the embodiments of the claimed subject matter require more features than are clearly stated in each claim. On the contrary, as reflected in the appended claims, the invention is in a state of having less than all the features of the disclosed individual embodiments. Therefore, the appended claims are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate preferred embodiment of the invention.
[0091] Those skilled in the art will also appreciate that the various illustrative logic blocks, modules, circuits, and algorithmic steps described in conjunction with the embodiments herein can all be implemented as electronic hardware, computer software, or a combination thereof. In order to clearly illustrate the interchangeability between hardware and software, various illustrative components, blocks, modules, circuits, and steps are generally described above around their functions. Whether such functions are implemented as hardware or software depends on specific applications and the design constraints imposed on the entire system. A skilled person can implement the described functions in an alternative manner for each specific application, but such implementation decisions should not be interpreted as departing from the scope of protection of the present disclosure.
[0092] The steps of the method or algorithm described in conjunction with the embodiments herein may be directly embodied as hardware, a software module executed by a processor, or a combination thereof. The software module may be located in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile disk, a CD-ROM, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium may also be an integral part of the processor. The processor and the storage medium may be located in an ASIC. The ASIC may be located in a user terminal. Of course, the processor and the storage medium may also be present in a user terminal as discrete components.
[0093] For software implementation, the techniques described in this application can be implemented with modules (e.g., procedures, functions, etc.) that perform the functions described in this application. These software codes can be stored in a memory unit and executed by a processor. The memory unit can be implemented within the processor or outside the processor. In the latter case, it is coupled to the processor in a communication manner via various means, which are well known in the art.
[0094] The above description includes examples of one or more embodiments. Of course, it is impossible to describe all possible combinations of components or methods for the purpose of describing the above embodiments, but it should be recognized by those skilled in the art that the various embodiments may be further combined and arranged. Therefore, the embodiments described herein are intended to cover all such changes, modifications and variations that fall within the scope of protection of the appended claims. In addition, with respect to the term "comprising" used in the specification or claims, the word is covered in a manner similar to the term "including", just as "including," is explained as a transitional word in the claims. In addition, any term "or" used in the specification of the claims is intended to mean "non-exclusive or".
Claims
1. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization, characterized in that: include: S100. Inputting the model surface data and the maximum number of iterations, and calculating the average normal vector of each surface of the model; S200. Based on the normal vector of the triangular face and the average normal vector of the domain face, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodriguez rotation formula to obtain the rotation matrix related to the normal vector of the triangular face and the average normal vector of the domain face and each face; S300. Based on the rotation matrix, calculate new coordinates of the mesh vertices; S400. Iterate S100-S300 to determine whether the current number of iterations is greater than the maximum number of iterations. If it is greater than the maximum number of iterations, map the spherical surface of the model; S500. When the spherical mapping of the model is completed, the left and right hemispheres of the sphere are respectively subjected to hemispherical texture mapping based on area constraints to calculate the model texture coordinates; S600: After the model texture coordinates are calculated, constrain the model texture.
2. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization according to claim 1, characterized in that: In S100, the domain surface average normal vector of each surface of the model is calculated, and the calculation formula is: l a =(1+e -2.7 )S(3<n i ,n * >-0.3) (1) in, is the sum of the k-order domain triangle normal vectors of each triangle in the triangulated network model, μ is a fixed weight, and n * is the average normal vector of the entire model, k is taken by default N f is the total number of triangle faces of the model, S(x) is the Sigmoid function, is the sum of the Gaussian curvatures of all points in the model where the Gaussian curvature is negative.
3. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization according to claim 1, characterized in that: In S200, the rotation between the normal vector of the triangular face and the average normal vector of the domain face is calculated using the Rodrigues rotation formula to obtain the rotation matrix between the normal vector of the triangular face and the average normal vector of the domain face and each face. The Rodrigues rotation formula is: R=I+sin(θ)K+(1-cos(θ))K 2 (4) Among them, formula 4 is the Rodriguez rotation formula, formula 5 is the formula for the composition of matrix K, and vector k is the triangle normal vector and its domain average normal vector The cross product of .
4. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization according to claim 1, characterized in that: In S300, based on the rotation matrix, the new coordinates of the mesh vertices are calculated. The specific method includes: calculating the new coordinates of the mesh vertices by the equation group Lv′=b, where v′ is the new coordinate of the vertex, the matrix L is an N*N matrix, N is the total number of model vertices, and the matrix L is formed as Formula 6, v j ~v i Indicates v j With v i Adjacent, α ij With α ji Indicates the two angles opposite to the side ij in two triangles with a common side ij. The value on the diagonal of the matrix L is v i The inverse of the sum of the weight values of the first-order domain points. Matrix b is an N*3 matrix. Matrix b is constructed as formula 7, where R ij With R ji Represents the rotation matrix of two triangles with common side ij; 5. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization according to claim 1, characterized in that: In S400, the spherical surface of the model is mapped. The specific method includes: constructing an outer sphere with the centroid of the model after iteration as the center of the circle and the maximum distance between the vertex and the centroid as the radius, mapping each vertex on the model surface to the outer sphere, and taking the intersection of the ray starting from the centroid and passing through a point V on the model surface and the surface of the outer sphere as the new coordinate of the vertex V.
6. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization according to claim 1, characterized in that: In S500, the left and right hemispheres of the spherical surface are respectively subjected to hemispherical texture mapping based on area constraints to calculate the model texture coordinates. The specific method includes: mapping a circular texture area with a radius of r≤1.0 to the spherical crown surface of a unit sphere with an azimuth angle ψ≤π / 2. When r=1.0, the texture mapping of the unit circle covers the entire hemisphere. When the mapping is completed, r=1.0, ψ=π / 2, S1=πr 2 =π, S1=2πr(r-rcosψ)=2π, S1 and S2 are the corresponding area of the texture plane and the hemisphere before and after mapping, that is, S1=2S2. The constraint relationship S1=2S2 is used to obtain the relationship between the radius r and the azimuth angle ψ. Based on the relationship between the radius r and the azimuth angle ψ, the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained.
7. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization as claimed in claim 6, characterized in that: The relationship between the radius r and the azimuth angle ψ is obtained by using the constraint relationship S1=2S2, and the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained based on the relationship between the radius r and the azimuth angle ψ. The specific method includes: the relationship between the radius r and the azimuth angle ψ is formula 8, and formula 8 is simplified to obtain formula 9, and the polar angle α of the texture plane point Q before mapping is equal to the longitude θ of the hemisphere point P after mapping, and finally the relationship between the texture coordinates (u, v) and the rectangular coordinates (x, y, z) is obtained. Formula 10; 8. A method for texture mapping of geological bodies along the occurrence based on spherical parameterization as claimed in claim 1, characterized in that: In S600, after the model texture coordinates are calculated, the model texture is constrained. The specific method includes: when using SVG to create the model surface texture, the SVG vector graphic is first rendered as a PNG bitmap image and then attached to the model surface. By implementing the texture calculation steps of S100-S500, the SVG vector graphic is rotated at a specific angle and finally mapped to the model surface to achieve the expected angle of the model surface texture.
9. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the geological body along-attitude texture mapping method as described in any one of claims 1-8.
Citation Information
Cited By
Nonferrous metal ore three-dimensional geological modeling method and system based on exploration line section
CN121330207A
Three-dimensional geological modeling method and system for non-ferrous metal mine based on exploration line profile
CN121330207B