Three-dimensional mesh hole-filling algorithm (Poisson method)

Source: Internet
Author: User
Tags scalar

This paper introduces a triangular mesh mending method based on Poisson equation. Firstly, the algorithm needs to generate an initial hole-filling mesh based on the hole boundary, and then through the normal estimation and Poisson equation, the geometric shape of the triangular patches in the reinforcement mesh can be modified to adapt and fuse with the surrounding original meshes. The main steps of the algorithm are as follows:

1-Detects the hole boundary and initializes the hole-filling mesh

2-Adjust the hole mesh

2.1-calculating the expected normal direction of vertices in the mesh of fill holes

2.2-triangular patches in mesh based on desired normal rotation

2.3-Adjusting the vertex position of the hole-filling mesh based on the Poisson equation

The following describes the specific process for each step in the algorithm:

1 : Detects hole boundaries and initializes a hole-filling mesh

The method of detecting the hole boundary and initializing the hole-filling mesh is the same as previously described. Since the initial hole mesh cannot be effectively fused with the mesh around the original hole, it is necessary to adjust the vertex position of the mesh to make the smooth transition between the mesh and the original mesh.

2.1 : calculating the expected normal direction of vertices in the mesh of reinforcement holes

As the normal direction of the hole boundary of the original mesh is known, it is used as the normal direction of the boundary of the mesh, and the Laplace equation is constructed to solve the normal distribution of the vertex in the mesh.

    • Laplace Operator:

Assuming that f represents a scalar on each vertex, the Laplace operator on the grid field at Vertex Xi is defined as follows (regardless of area effect):

where N1 (xi) represents the 1-ring neighbor Point of Vertex XI, and Αij and Βij are 2 diagonal angles corresponding to the edge Eij.

function L =Laplace_matrix (V, F) fring=compute_vertex_face_ring (F); Fpoint= [V (F (:,1),:), V (F (:,2),:), V (F (:,3),:)]; Farea=0.5*Doublearea (V, F); NV= Size (V,1); L=sparse ([],[],[],NV,NV);  fori =1: NV NF=Length (fring{i});  forj =1: NF F=F (Fring{i} (j),:); Tk=Fpoint (Fring{i} (j),:); GRADBI=gradb (f, I, Tk);  forK =1:3GRADBJ=gradb (F, f (k), Tk); L (I,f (k))= L (I,f (k)) + dot (GRADBI,GRADBJ) *Farea (Fring{i} (j)); End End EndEnd
View Code

2.2 : Triangular patches in mesh based on desired normal rotation

After calculating the expected normal direction of the vertex in the mesh, the expected normal direction of triangular patches can be obtained, and the expected normal direction of triangular patches is the average value of the expected normal direction of the three vertices, and then all triangular patches in the hole mesh are rotated according to the expected normal direction. The rotation parameters are calculated as follows: Assuming Ni, ni ' and ci are the original normal direction of the triangular patch fi, the expected normal and center of gravity position, ni and ni ' fork in the direction A is triangular plane fi rotation axis, ni and ni ' angle φ is triangular patch fi rotation angle, Then the triangular patch fi will take CI as the center of rotation, around the axis a rotation angle φ to a new position.

2.3 : Based on Poisson equation Adjusting the vertex position of the hole-filling mesh

The triangular patches of the rotating mesh will tear the holes in the mesh, so we use the Poisson equation to re-form the continuous mesh surface. In the establishment of the Poisson equation, we need to calculate the gradient field of the tearing mesh and use it as the guiding field of the Poisson equation to adjust the vertex position of the mesh.

Where f is the adjusted mesh vertex position to be asked, W is the gradient field for tearing the mesh.

    • Gradient operator:

Assuming that f represents a scalar at each vertex, the gradient operator for the scalar field F in the grid field within any triangular patch t is defined as follows:

Where the base function gradient ▽φi expression is, ⊥ means to rotate the vector 90 degrees counterclockwise, at the area of the triangle T.

    • Divergence operator:

Assuming that w represents a vector on each triangle, the divergence operator of the vector field W at Vertex XI in the grid field is defined as follows:

where T1 (xi) represents the 1-ring neighborhood triangle of Vertex Xi, at represents the area of the triangular slice t.

Effect:

This article is original, reprint please indicate source: http://www.cnblogs.com/shushen

Related:

Three-dimensional mesh deformation algorithm (gradient-based deformation): http://www.cnblogs.com/shushen/p/4932089.html

Three-dimensional mesh hole-filling algorithm (Radial Basis Function): http://www.cnblogs.com/shushen/p/5759679.html

Reference documents:

[1] Wei Zhao, shuming Gao, and Hongwei Lin. 2007. A robust hole-filling algorithm for triangular mesh. Vis. Comput. (November 2007), 987-997.

Three-dimensional mesh hole-filling algorithm (Poisson method)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.