Robust low-approximation error cage generation method
By generating robust, low-approximation-error cages through a two-stage algorithm and optimization method, the complexity and approximation error problems of cage generation in existing technologies are solved, achieving efficient and accurate cage generation that is applicable to a variety of 3D models.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HEFEI JIUSHAO INTELLIGENT TECH CO LTD
- Filing Date
- 2023-02-15
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies struggle to simultaneously satisfy the requirements of being closed, non-self-intersecting, manifold, and low-complexity when generating a Cage, while also exhibiting significant approximation errors.
A two-stage algorithm is adopted. First, an initial tetrahedral mesh is generated through a conformal tetrahedralization algorithm. The boundary is handled by surrogate points and singular removal operations. Then, a constrained optimization algorithm is used, including tangential Laplacian smoothing, degree equalization and edge folding operations, to reduce complexity and approximation error. Robustness is ensured by using precise arithmetic and floating-point filtering techniques.
The generated cage satisfies the requirements of being closed, non-self-intersecting, manifold, and low in complexity, with small approximation error, thus improving computational efficiency and result accuracy, and is suitable for various 3D models.
Smart Images

Figure CN116433867B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of shape design and generation technology, specifically a robust method for generating cages with low approximation error. Background Technology
[0002] Cages provide a tighter representation of closed, complex shapes; they are powerful tools for tasks such as mesh deformation, collision detection, physics simulation, and constructing multi-resolution linear systems. A robust and automated algorithm for constructing cages typically requires a closed, non-self-intersecting, manifold triangular mesh as input, and then constructs a cage on it that satisfies four requirements:
[0003] (1) Cage encloses the triangular mesh;
[0004] (2) Cage is a manifold and does not self-intersect;
[0005] (3) Cage has low complexity;
[0006] (4) The approximation error between the Cage and the triangular mesh is low.
[0007] The first two requirements are typically converted into hard constraints; only cages that satisfy these hard constraints are valid. The latter two requirements are typically converted into optimization objectives. Hard constraints ensure that subsequent applications using the cage will produce correct results. The requirement of low complexity reduces the computational burden of subsequent applications, while the requirement of low approximation error improves the accuracy of the results.
[0008] For example, in mesh deformation applications, a low-resolution cage can reduce the computational load of the mesh deformation program and the number of manual operations required by the user; a cage with small approximation error can better preserve the characteristics of the input mesh, allowing the user to deform the details of the input mesh. Furthermore, in physics simulation applications, solving equations or performing collision detection on a low-resolution cage, rather than on the original resolution input mesh, can significantly reduce time consumption; and a cage with high approximation accuracy can further reduce the difference between the results generated on the cage and the results generated on the original input mesh, improving the accuracy of the physics simulation. Summary of the Invention
[0009] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes a robust low approximation error Cage generation method.
[0010] A robust, low-approximation-error cage generation method is presented. This method not only generates cages that satisfy two hard constraints on triangular meshes, but also achieves better quality results in terms of both complexity and approximation error compared to previous methods. For triangular meshes that meet the requirements (closed, non-self-intersecting, and manifold), this method can automatically generate the cages described above. It utilizes precise arithmetic and floating-point filtering techniques to ensure the robustness of the algorithm, while employing techniques such as bounding box hierarchical trees and static uniform meshes to reduce the algorithm's time overhead.
[0011] A robust, low-approximation-error cage generation method, for closed, manifold, and non-self-intersecting triangular mesh models, obtains the triangular mesh surrounding the input model, termed the cage, through a two-stage algorithm. The cage satisfies four conditions:
[0012] (1) The Cage completely surrounds the triangular mesh model, that is, the input model is located inside the Cage and does not intersect with the Cage;
[0013] (2) Cage does not self-fertilize;
[0014] (3) Cage has low complexity, that is, it has few vertices;
[0015] (4) Cage approximates the input model, that is, the approximation error between Cage and the input model is low, and the approximation error can be measured by the Hausdorff distance.
[0016] The two-phase algorithm is divided into:
[0017] SS1: Input triangular mesh model Generate the initial tetrahedral mesh using the conformal tetrahedral meshing algorithm. ( It is to maintain The shape, that is There exists a triangular subset that is geometrically similar to (Completely identical); for Two singular removal operations are performed to obtain a tetrahedral mesh. extract The outer boundary is obtained by triangular mesh Will As the initial Cage;
[0018] SS2: For Use constrained optimization algorithms to reduce Reduce complexity and The approximation error is reduced, thus improving... Regularity.
[0019] Furthermore, proxy points are added as part of the input to the conformal tetrahedralization algorithm to reduce the initial... and The approximate error between them; there are two types of surrogate points: (1) uniform surrogate points; (2) offset surrogate points;
[0020] For uniform agent points, first generate The tightest enclosure box Then Magnify by a certain factor to generate a new bounding box Finally in Generate agent points at medium distances to form a uniform agent point distribution.
[0021] For offset proxy points, first subdivide. The larger triangle is then calculated. The centroid, normal, and average side length of all triangles are determined, and finally, the centroid is shifted along the normal direction by the average side length to form an offset surrogate point.
[0022] Furthermore, a conformal tetrahedralization algorithm is used to... And using the proxy point as input, generate a hold Tetrahedral mesh of shape Then, remove China does not agree Adjacent tetrahedrons form Due to the characteristics of the conformal tetrahedralization algorithm, The outer boundary does not coincide with Intersecting and completely enclosing
[0023] Furthermore, remove using two singular removal operations. The singular points and singular edges that exist in the;
[0024] remember for The singularity removal operation consists of two steps: For right Subdivide all tetrahedrons by 1-12; remove All of the above are not related to Adjacent tetrahedrons yield
[0025] right After performing two singularity removal operations, we get extract The outer boundary, as the initial
[0026] Furthermore, exact arithmetic is used to ensure the robustness of the first stage. More specifically, during the conformal tetrahedralization algorithm and the 1-12 subdivision process, the coordinates of points in the newly generated 3D space are represented using precise rational numbers to avoid errors caused by insufficient floating-point precision in computers. To save memory space, the points represented by rational numbers need to be rounded to the points represented by floating-point numbers, again using an exact algorithm to ensure that flipped tetrahedrons are not produced after rounding.
[0027] Furthermore, in constrained optimization methods, the constraints are defined as follows: It is manifold, non-self-intersecting, and enclosed. Yes. The interior-point method is used for optimization, that is, in the initial... Under the condition that the constraints are satisfied, for Perform optimization without violating constraints. The optimization method consists of three parts:
[0028] Smoothing: Optimized using tangential Laplacian smoothing operation The vertex positions are used to improve the regularity of the mesh;
[0029] Equilibrium degree: Flip The edges are balanced The degree of the vertices is used to improve the regularity of the mesh;
[0030] Reduce complexity: through folding To reduce the number of edges Reduce the number of vertices and decrease the complexity of the mesh;
[0031] And in all three parts above, a reduction is required. and The approximate error between them.
[0032] Furthermore, the bidirectional Hausdorff distance is used as a metric. and The approximate error between them. Define d(p,q) as the Euclidean distance between two points, and the one-way Hausdorff distance is defined as:
[0033]
[0034]
[0035] The two-way Hausdorff distance is defined as:
[0036]
[0037] Because each local operation only affects A local area on. Therefore, in A static uniform grid is established on top of this. A static axis-aligned bounding box hierarchy tree (AABB tree) is built for the local region to accelerate the calculation of bidirectional Hausdorff distance.
[0038] Furthermore, in the smoothing optimization method:
[0039] Prediction using tangential Laplacian smoothing operation The optimal target position of the vertex;
[0040] Sample a finite number of target positions within a sphere centered at the optimal target position and with a radius equal to 0.1 times the average side length of the adjacent sides of the vertex.
[0041] Check whether all target positions satisfy the constraints, calculate the change in approximation error after setting the vertex to the target position, and select the target position that satisfies the constraints and has the smallest change as the final target position.
[0042] Set the position of the vertex to the final target position.
[0043] Furthermore, in the equilibrium degree optimization method, flipping... The edge makes The degree of a vertex tends to 6. A vertex is said to satisfy the constraint and make... A flip operation is considered valid if the degree of a vertex approaches 6. To reduce approximation error, valid flip operations with the smallest change in approximation error are prioritized. A priority queue is used to efficiently select valid flip operations with the smallest change in approximation error, storing all valid flip operations in ascending order based on the change in approximation error. The flip operation at the head of the queue is executed each time. After each flip operation, the flip operations on all affected edges are updated. If the flip operation is still valid, a new change in approximation error is calculated, and the operation is added to the queue or its weight is updated; otherwise, the operation is removed from the priority queue.
[0044] Furthermore, in the complexity reduction optimization method, edges are folded to reduce... The complexity is as follows: After folding an edge, the position of the folded vertex needs to be set, and the target position is found through features. A folding operation that satisfies the constraints is called a valid folding operation. At the same time, to reduce approximation error, valid folding operations with the smallest change in approximation error are prioritized. The aforementioned operations are completed using a priority queue feature.
[0045] Furthermore, in the equilibrium degree and reduced complexity optimization methods, the degrees of the vertices affected by the operations are restricted to not be greater than a certain number; in the optimization iteration process, if only a small number of vertices are reduced in a certain iteration, the degree restriction is relaxed.
[0046] Furthermore, the constraints are converted into intersection detection between triangular meshes and further into intersection detection between triangles. More specifically, the constraint " surrounds " is converted into that the triangular mesh does not intersect with the triangular mesh , that is, all the triangles of do not intersect with any triangle of . The constraint " is self - intersection free" is converted into that between two triangles in , except for intersecting at an edge or a vertex due to topological adjacency, they are completely non - intersecting.
[0047] Furthermore, a static AABB tree is built on , and a dynamic AABB tree is built on . After each optimization operation, the dynamic AABB tree is locally updated according to the updated triangles. The AABB tree is used to accelerate the intersection detection between meshes and the self - intersection detection of meshes.
[0048] Furthermore, using exact arithmetic and floating - point filtering techniques, the intersection detection between triangles is accurately and efficiently completed, ensuring the robustness of the intersection detection, ensuring that the constraints are not violated and making the algorithm have a relatively small acceptable running time.
[0049] Compared with the prior art, the beneficial effects of the present invention are:
[0050] Through the conformal tetrahedralization algorithm, tetrahedral mesh subdivision algorithm, constrained optimization algorithm, exact algorithm, floating - point filtering techniques, and spatial hierarchical structure, hash structure, etc., the robustness of Cage generation is effectively ensured, a large amount of time overhead is saved, and the performance of Cage in several important indicators is improved. At the same time, the algorithm of the present application is applicable to general triangular mesh models. For models that are not in the triangular mesh format, after converting them into the representation form of triangular meshes, they are still applicable to our algorithm, so it can be applicable to more 3D models. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1This is a flowchart of a robust Cage generation algorithm with low approximation error according to the present invention.
[0052] Figure 2 Here are flowcharts of the three local optimization operations in the optimization method of this invention;
[0053] Figure 3 For the three input models and the Cage results generated using this example;
[0054] Figure 4 This is a schematic diagram of an electronic device. Detailed Implementation
[0055] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] A robust, low-approximation-error cage generation method effectively ensures the robustness of cage generation while saving significant time costs and improving cage performance on several key metrics through conformal tetrahedralization algorithms, tetrahedral mesh subdivision algorithms, constrained optimization algorithms, precise algorithms, floating-point filtering techniques, spatial hierarchy structures, and hash structures. Furthermore, the algorithm is applicable to general triangular mesh models; for models not in a triangular mesh format, the algorithm remains suitable after conversion to a triangular mesh representation, thus enabling its applicability to a wider range of 3D models. The flowchart of the robust, low-approximation-error cage generation algorithm is shown below. Figure 1 As shown, the Cage results generated in this embodiment for the three input models (crab, bear, and can) are as follows: Figure 3 As shown.
[0057] Example 1:
[0058] This application provides a robust method for generating cages with low approximation error, which specifically includes the following steps:
[0059] Obtain the triangular mesh model on which the cage needs to be generated. Based on the aforementioned triangular mesh model, a conformal tetrahedral mesh is generated; specifically,
[0060] 1.1. The user first inputs the triangular mesh model on which they want to generate a cage. According to the triangular mesh model mentioned above Generate proxy points, including:
[0061] Uniform agent points: First for Generate the tightest bounding box remember The length of the diagonal is b t Then Increase by r times to obtain remember The length of its diagonal is b, and the lengths along the x, y, and z axes are b. x ,b y ,b z Finally, in p is generated uniformly along the central axis. 3 A uniform surrogate point, more specifically, along the x, y, and z axes with lengths b respectively. x / p,b y / p,b z / p Generate agent points uniformly;
[0062] Offset proxy point: First subdivide The larger triangle is considered to have an area greater than b. 2 The triangle / f needs to be subdivided (i.e., its area is greater than b). 2 / f represents the larger triangle), where f is a control parameter; then calculate the centroid c and average side length of all triangles. And the normal direction n; finally, the offset surrogate point is obtained by shifting the centroid along the normal direction by the average side length, i.e.
[0063] 1.2. Then with Using surrogate points as input, a conformal tetrahedralization algorithm is used to generate a constrained tetrahedral structure. Tetrahedral mesh of shape include:
[0064] Using the vertices and surrogate points of the triangular mesh model as input, the initial tetrahedral mesh is generated using the incremental Delaunay tetrahedralization algorithm.
[0065] Using the initial tetrahedral mesh and the triangular faces of the triangular mesh model as input, a conformal polyhedral mesh is generated using the binary space partition algorithm (BSP). In BSP, new vertices are generated, which appear as intersections of line segments and triangles. Their coordinate precision is often higher than that of machine floating-point numbers, so precise arithmetic operations are used, and rational numbers are used to represent and store them.
[0066] Finally, for All polyhedra are tetrahedredged to obtain a conformal tetrahedral mesh.
[0067] Example 2:
[0068] Remove using singular removal operation Find all singular points and singular edges in the array and extract them. The outer boundary is used as the initial Define the singularity removal operation as follows: given a triangular mesh and maintain Tetrahedral mesh of shape Subdivided into 1-12 subdivisions All tetrahedrons (called subdivision operation), then remove All of the above Non-adjacent tetrahedrons (referred to as the removal operation) are output as a tetrahedral mesh after subdivision and removal. It's important to note that subdivision generates new vertices, which appear as the midpoints of line segments. Their coordinate precision is often higher than that of machine floating-point numbers; therefore, precise arithmetic operations are used, and rational numbers are used for representation and storage.
[0069] As an embodiment of the present invention, preferably, to avoid using too many rational numbers to represent vertex coordinates, a rounding operation is added to the singular removal operation: after the subdivision operation and before the removal operation, for all vertices located inside a tetrahedron, if their rational coordinates are rounded to the nearest floating-point coordinates and the adjacent tetrahedrons of the vertex are not flipped, then floating-point coordinates are used to represent them instead of rational coordinates; otherwise, they remain unchanged.
[0070] As an embodiment of the present invention, preferably, it further includes:
[0071] In Example 1 All polyhedra are tetrahedredged to obtain a conformal tetrahedral mesh. After that, remove Zhongyu Adjacent tetrahedrons form a tetrahedral mesh. Still maintain Shape;
[0072] right Perform two singular removal operations, with rounding added during the singular removal operations. The resulting tetrahedral mesh is denoted as .
[0073] extract The outer boundary is used as the initial At this time It is manifold, non-self-intersecting, and enclosed. of.
[0074] Example 3:
[0075] The method of constrained optimization is used to improve the results obtained in Example 2. Regularity, reduction Reduce complexity and The approximate error between them.
[0076] As an embodiment provided by the present invention, preferably, because the result obtained from embodiment two... It is manifold, non-self-intersecting, and enclosed. Yes. The interior-point method is used for optimization, that is, in the initial... Under the condition that the constraints are satisfied, for Perform optimizations that do not violate constraints.
[0077] As an embodiment of the present invention, the preferred optimization method consists of three parts:
[0078] 1.1 Smoothing; optimized using tangential Laplacian smoothing operation. The vertex positions are used to improve the regularity of the mesh;
[0079] 1.2 Equilibrium degree; Reversal The edges are balanced The degree of the vertices is used to improve the regularity of the mesh;
[0080] 1.3 Reduce complexity; through folding To reduce the number of edges Reduce the number of vertices to decrease mesh complexity; and in all three parts above, it is required to reduce the number of vertices. and The approximate error between them.
[0081] Optimization methods such as Figure 2 As shown below, the method for reducing approximation error will be described in Example 4, the smoothing optimization method will be described in Example 5, the balanced degree optimization method will be described in Example 6, and the complexity reduction optimization method will be described in Example 7.
[0082] Example 4:
[0083] Measured using bidirectional Hausdorff distance and The approximate error between them; define d(p,q) as the Euclidean distance between two points, and the one-way Hausdorff distance is defined as:
[0084]
[0085]
[0086] The two-way Hausdorff distance is defined as:
[0087]
[0088] As an embodiment of the present invention, preferably, because each local operation only affects... Specifically, in the local region above, optimizing vertex positions affects the 1-neighbor triangles of a vertex, flipping edges affects the adjacent triangles of an edge, and folding edges affects the 1-neighbor triangles of an edge. Therefore, when calculating the bidirectional Hausdorff distance, we only need to consider... and The bidirectional Hausdorff distance between the affected local regions is called the local bidirectional Hausdorff distance. Therefore, in A static uniform grid is established on top, and in A static AABB tree is built for the local region to accelerate the calculation of the local bidirectional Hausdorff distance.
[0089] Example 5:
[0090] Improve using smoothing optimization methods To determine the regularity, a tangential Laplacian smoothing algorithm with area weights is used to optimize vertex positions.
[0091] As an embodiment of the present invention, preferably, for a vertex v, let its coordinate position be p, its normal vector be n, and its 1-neighbor triangle set be... The area of triangle t is The centroid of triangle t is c. t The position calculated by the area-weighted Laplace smoothing algorithm is:
[0092]
[0093] Projecting q onto the tangent plane of vertex v, we get:
[0094] p′=q+nn T (pq)
[0095] If moving vertex v to the position p′ can do so without violating the constraints and can reduce the approximation error or reduce the new approximation error to no more than a certain value, then the move operation should be performed.
[0096] Otherwise, a fixed number of positions are randomly sampled near p′ (for spheres with p′ as the center and a radius of 0.1 times the average side length of the adjacent sides of v), and the position that does not violate the constraints and has the lowest approximation error change is selected, and v is set at that position. This is called the sampling strategy in smooth operation.
[0097] As an embodiment provided by the present invention, preferably, for Performing a smoothing operation on all vertices is called a smoothing operation on all vertices. A smooth iteration.
[0098] Example 6:
[0099] Improve using the balanced degree optimization method The regularity of a triangular mesh is considered to be better if the degree of its interior vertices is closer to 6 and the degree of its boundary vertices is closer to 4. Therefore, for... Let e be an edge. Flipping e will affect the degree measures of its two endpoints a0, a1, and the opposite points b0, b1 of the two triangles adjacent to e. Let be an edge.
[0100]
[0101] Let the difference between the degree of adjacent vertices and the degree of the target vertex be:
[0102]
[0103] If the flipped δ(e) is smaller than the original δ(e), it means that flipping e can improve... The regularity of . If flipping 'e' does not violate the constraint, and can improve . If the regularity is such that the flip is valid, then the flip is called a valid flip.
[0104] Then we have:
[0105] 6.1 pairs Calculate the change in approximate error before and after each valid flip. This change can be positive or negative; a negative change indicates a decrease in approximate error, while a negative change indicates an increase. Store all valid flips in a priority queue, weighted by the change in approximate error, in ascending order.
[0106] 6.2 Select the head of the queue to perform the flip operation.
[0107] 6.3 After the flip operation, update the flip operations on all affected edges. If the flip operation is still valid, calculate the new approximation error change and add it to the queue or update the weights; otherwise, remove the operation from the priority queue.
[0108] 6.4 If the queue is not empty, go to step 0; otherwise, end.
[0109] Step 0 to 0 is called one equilibrium degree iteration.
[0110] Example 7:
[0111] We employ optimization methods to reduce complexity. In this embodiment, we use the operation of folding edges to reduce complexity. The complexity of edge folding is that it folds an edge e to a new vertex v and determines the position of the new vertex v. Therefore, each edge fold can reduce the number of vertices by one, thus reducing the complexity. The complexity.
[0112] To determine the validity and approximation error change of a single folding operation, we first assume that edge e has been folded to vertex v. Then, we use the area-weighted tangential Laplacian smoothing algorithm from Example 5 to calculate the new vertex position of v. Finally, we execute a sampling strategy similar to that in Example 5 to calculate a position for v that does not violate the constraints and has the lowest approximation error change. If such a position exists, the fold is called a valid fold.
[0113] Then we have:
[0114] 7.1 pairs Calculate whether there is a valid fold for all edges above, and store all valid folds in a priority queue with the change in approximation error as the weight, in ascending order;
[0115] 7.2 Select and execute the folding operation at the head of the queue;
[0116] 7.3 After a fold operation, update the fold operation on all affected edges; if the fold operation is still valid, calculate the new approximation error change and add it to the queue or update the weights; otherwise, remove the operation from the priority queue.
[0117] 7.4 If the queue is not empty, go to step 0; otherwise, end.
[0118] Step 0 to the end is called a complexity reduction iteration.
[0119] Example 8:
[0120] This embodiment will provide a more detailed supplement to Embodiment 3. Users can specify the target number of vertices N for the Cage. tar The sequential execution of the smoothing iteration, balanced degree iteration, and complexity reduction iteration in Examples 5, 6, and 7 is called one optimization iteration. The algorithm will repeatedly execute optimization iterations to improve... Regularity, reduce While reducing the approximation error, The complexity until The number of vertices reaches N tar It should be noted that the algorithm cannot guarantee a reduction. The complexity is such that when the number of vertices is specified, the optimization iterations reach the maximum number of iterations I. max The optimization iteration process will be exited to ensure that the algorithm can terminate.
[0121] Example 9:
[0122] Limit the degree of vertices to further improve the regularity. More specifically, in Embodiments 6 and 7, it is required that neither the edge flipping operation nor the edge folding operation generates a vertex with a degree exceeding val max . val max usually takes 8. If after continuous I val iterations, the complexity has not decreased, val max will be increased by 1. max That is, val
[0123] Embodiment 10:
[0124] This embodiment will make a more detailed supplement to the constraint checks in Embodiments 5, 6, and 7. The constraint is that it is manifold, non-self-intersecting, and encloses . In the case of only using smooth operations, edge flipping operations, and edge folding operations, must be manifold. The constraint that "
[0125] encloses " is converted to that the triangular mesh does not intersect with the triangular mesh , that is, none of the triangles of intersect with any triangle of . In the operations of Embodiments 5, 6, and 7, whenever a triangle in is updated, it is checked whether the updated triangle intersects with . If any triangle intersects with , then this operation violates the constraint. To accelerate the intersection detection, a static AABB tree is built on .
[0126] The constraint that " is non-self-intersecting" is converted to that between two triangles in , except for intersecting at an edge or a vertex due to topological adjacency, they are completely non-intersecting. In the operations of Embodiments 5, 6, and 7, whenever a triangle in is updated, it is checked whether the updated triangle intersects with other triangles. If there is an intersection, then this operation violates the constraint. To accelerate the intersection detection, a dynamic AABB tree is built on . The initialization of the dynamic AABB tree is the same as that of the static AABB tree, but it is required that when a triangle in is updated, the corresponding triangle and the corresponding hierarchical bounding box in the dynamic AABB tree are synchronously updated.
[0127] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0128] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0129] Example 11:
[0130] This application also provides an electronic device, comprising: one or more processors; a memory for storing one or more programs; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the robust low-approximation-error Cage generation algorithm as described above. Figure 3 The diagram shown illustrates a hardware structure of any data processing-capable device that supports a robust, low-approximation-error Cage generation algorithm provided by an embodiment of the present invention. (Except for...) Figure 3 In addition to the processor, memory, and network interface shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0131] Example 12:
[0132] Accordingly, this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, implement the robust low-approximation-error Cage generation algorithm described above. The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device.
[0133] As an embodiment of the present invention, preferably, the computer-readable storage medium may include both internal storage units of any device with data processing capabilities and external storage devices. The computer-readable storage medium is used to store the computer program and other programs and data required by the device with data processing capabilities, and may also be used to temporarily store data that has been output or will be output.
[0134] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.
Claims
1. A robust low-approximation-error Cage generation method characterized in that, The triangular mesh surrounding the input model is obtained by a two-stage algorithm, the two-stage algorithm comprising: SS1: inputted triangle mesh model , initial tetrahedral mesh is generated by conforming tetrahedralization algorithm ; for , two singularities removal operations are performed to obtain tetrahedral mesh , outer boundary of is extracted to obtain triangle mesh , as initial Cage; SS2: For , use a constrained optimization algorithm to reduce complexity, reduce approximation error with , and improve regularity; generating an initial tetrahedral mesh using the conforming tetrahedralization algorithm the following steps are also performed: Adding proxy points as part of the input of the conforming tetrahedralization algorithm; the proxy points include uniform proxy points and offset proxy points; Among them, uniform agent points are generated first. The tightest enclosure box Then Magnify by a preset factor to generate a new bounding box Finally in Generate agent points at medium distances to form a uniform agent point distribution. Offset proxy point: First select based on the size of the triangle. The triangle in the middle, then calculate The centroid, normal, and average side length of all triangles are determined, and finally, the centroid is shifted along the normal direction by the average side length to form an offset surrogate point.
2. The method of claim 1, wherein, the initial tetrahedral mesh maintain the shape of the triangle subset present in is geometrically identical to the shape of the triangle subset present in maintain the shape of the triangle subset present in First, a conforming tetrahedralization algorithm is used to generate a tetrahedral mesh that preserves the shape of the input and proxy points as input ; Then, the removed tetrahedrons do not intersect with the outer boundary of the tetrahedrons, and completely enclose the target object. 3. The method of claim 2, wherein, A method for performing the singular removal operation twice is to remove the singular point and the singular edge present in the middle using two singular removal operations A method for removing the singular point and the singular edge present in the middle is to Recall To ; For : do 1-12 subdivision operations on all tetrahedra of , remove all tetrahedra of that are not adjacent to ; right After performing two singularity removal operations, we get ; Extraction outer boundary of the Cage as an initial Cage .
4. The method of claim 1, wherein, The and The approximation error is measured using bidirectional Hausdorff distance. and Approximate error between them; Definitions The one-way Hausdorff distance is defined as the Euclidean distance between two points. The bidirectional Hausdorff distance is defined as: In A static uniform grid is established on A static axis-aligned bounding box hierarchy tree is established on the local region on to accelerate the computation of bidirectional Hausdorff distance.
5. The method of claim 1, wherein, using the optimization algorithm with the band constraint to reduce the complexity of the method is to The constraints are specified as are manifold, non-intersecting and enclose ; optimization is performed using interior point method; The method for optimization by the interior point method is: In the initial satisfying the constraints, to perform an optimization without violating the constraints; The optimization comprises: Smooth optimization: optimize the vertex positions using a tangential Laplacian smoothing operation to improve the regularity of the mesh of the vertices, improving the regularity of the mesh; Balance degree optimization: flip The edges are balanced The degree of the vertices is used to improve the regularity of the mesh; Reducing complexity optimization: by folding edges to reduce the number of vertices of the mesh. Reducing complexity of the mesh by folding edges to reduce the number of vertices of the mesh. 6. The method of claim 5, wherein, The method for smoothing optimization is: Predicting using tangential laplacian smoothing operations the optimal target position of the vertex; Sampling a limited number of target positions in a sphere with the optimal target position as the center and 0.1 times the average edge length of the adjacent edges of the vertex as the radius; Detecting whether all the sampled target positions satisfy the constraint, calculating the change in the approximation error after the vertex is set to the target position, and selecting the target position that satisfies the constraint and has the minimum change as the final target position; Setting the position of the vertex to the final target position.
7. The method of claim 5, wherein, The constraint in the optimization algorithm is converted into intersection detection between triangular meshes and further converted into intersection detection between triangles: Convert the constraint " which encloses into a triangular mesh such that the triangular mesh does not intersect, that is, none of the triangles of intersects any of the triangles of "constraints" are "disjoint" if two triangles in are disjoint except for intersecting along an edge or a vertex because of topological adjacency.
8. The method of claim 7, wherein, The acceleration method of the optimization algorithm is: In a static bounding box hierarchy tree is built, in a dynamic bounding box hierarchy tree is built; After each optimization operation, the updated triangle, the local update dynamic bounding box hierarchy tree is updated according to the updated triangle, the local update dynamic bounding box hierarchy tree is updated according to The bounding box hierarchy tree is used to accelerate the intersection detection between meshes and the self-intersection detection of meshes.
9. The method of claim 5, wherein, In the degree number balancing optimization and the complexity reduction optimization method, the degree number of the vertex affected by the operation is limited to be not greater than a certain number; in the iteration process of optimization, if the number of vertices reduced in a certain iteration is less than a preset value, the degree number limit is relaxed.