Mesh deformation algorithm (gradient-based deformation)

Source: Internet
Author: User

The vertex coordinates (x, y, z) on a triangular mesh are considered to be 3 independent scalar fields, so there are 3 independent gradient fields for each triangle on the grid. The gradient field is a differential attribute of the mesh, which is equivalent to the characteristics of the mesh, and does not change in middle age during the deformation process (avoiding deformity after mesh deformation). Then when the user drags the control point set on the grid, the mesh deformation problem becomes the solution of the following formula:

On the basis of the Variational method, the Poisson equation is solved by minimizing the upper formula:

Where φ is the post-deformation coordinate of the mesh to be obtained, W is the gradient field after the mesh deformation.

The above formula can be further represented as solving a sparse linear equation group:

Where L is the Laplace operator of the grid and B is the divergence value of the gradient field W at the vertex of the mesh.

The crux of the problem is how to get the grid deformation after the gradient field W, the article [Yu et al. 2004] refers to it is obtained by the weighted operation of the control point set transformation, and puts forward several different weighting methods (linear weighting, high Scar, etc.). In addition the article [Zayer et al. 2005] mentions that a harmonic field can be constructed within a grid as a weighting factor.

1. Discrete gradient operator Definitions:

Suppose F is a piecewise linear function that has F (xi) =fi,f (XJ) =fj,f (XK) =FK at the vertices of each triangular slice {xi,xj,xk} of the mesh, with linear interpolation to know the value of f at each point on the triangle:

So the gradient of F is as follows:

Where the base function φi,φj,φk satisfies φi+φj+φk=1, then the sum of their gradients is ▽φi+▽φj+▽φk=0. So the gradient of F can be written in the following form:

After simple calculation can be obtained ▽φi expression is, also can write ▽φj, ▽φk expression, wherein the ⊥ means to rotate the vector counterclockwise 90 degrees, a is the area of the triangle slice.

2. Discrete divergence operator Definition:

the vector-valued function w:s→r3,s represents the mesh, w represents the vector on each triangle, and the divergence of W at Vertex XI can be defined as:

where T (xi) represents the 1-ring neighborhood triangular slice of vertex XI, at represents the area of the triangular slice t.

3. Discrete Laplace operator Definitions:

The Laplace operator of the Vertex Xi can be obtained by substituting the expression of the gradient operator into the divergence operator expression as follows:

where N (xi) represents the 1-ring neighbor Point of the vertex XI.

Effect:

Welcome everyone to discuss computer graphics algorithm problem, email: [Email protected]

Reference documents:

[1] Y Yu, K. Zhou, D. Xu, X. Shi, H. Bao, B. Guo, and H.-y. Shum. "Mesh Editing with poisson-based Gradient Field manipulation." ACM Transactions on Graphics (Proc. SIGGRAPH) 23:3 (2004), 644-51.

[2] R. Zayer, C. Rossl, Z. Karni, and H.-p. Seidel. "Harmonic Guidance for Surface deformation." Computer Graphics Forum (Proc. Eurographics) 24:3 (2005), 601-10.

[3] Xudong. Differential mesh processing technology [D]. Zhejiang University, 2006.

[4] Liuchangsen. Laplace operator on triangular mesh surface and its application [D]. China University of Science and Technology, 2012.

Mesh deformation algorithm (gradient-based deformation)

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.