The continuous smooth deformation of the mathematical surface can be modeled by minimizing the energy function, in which the energy function is used to adjust the degree of stretching or bending of the surface, so the optimal solution of minimizing the energy function and satisfying all boundary conditions is to find the surface.
The energy function is usually the form of a two-time function:
Where s* represents the K-order biasing of the surface parameters U and v.
For solving the optimization problem, the corresponding Euler-lagrange equation is usually obtained by the variational method, and then the optimal solution is obtained by solving the equation. For the two energy function form, the corresponding Euler-lagrange equation is the following multi-order harmonic equation:
For example, the corresponding Euler-lagrange equation is the 2-order laplace equation δ2x = 0. In the above equation, δ stands for Laplace operator, and the restriction condition of boundary region δω BJ guarantees the existence of non-trivial solution.
for k = 1, the above equation describes a surface that satisfies the smallest surface area, and for k = 2, the equation describes the surface that satisfies the minimum curvature of the curved surface, and for k = 3, the equation describes the surface that satisfies the smallest variation of the curved surface.
The boundary conditions of the equation can be selected Dirichlet boundary conditions (the first kind of boundary condition), that is, the position of the specified surface boundary point, or the Neumann boundary condition (the second type boundary condition), that is, the normal direction of the specified surface boundary point.
If the surface is represented by a triangular grid, then we need to use the discrete Laplace operator in the equation, which is a linear operator, and the concrete form is explained in the "Mesh deformation algorithm", the expression is as follows:
Where Αij and Βij are 2 diagonal corresponding to the Edge Eij, N1 (PI) represents the 1-ring neighborhood point of the vertex Pi, and A (PI) represents the Voronoi area of the vertex pi.
function L =Laplace_matrix (V, F) NV= Size (V,1); L=sparse (NV,NV); fori =1:3I1= MoD (i-1,3)+1; I2= MoD (i,3)+1; i3= MoD (i+1,3)+1; VEC1= V (F (:, I2),:)-V (F (:, I1),:); VEC2= V (F (:, i3),:)-V (F (:, I1),:); Cotangle=0.5. * Dot (Vec1, VEC2,2)./Norm (Cross (VEC1, VEC2,2)); L= L +sparse (F (:, I2), F (:, i3), Cotangle, NV, NV); End L= L + L';L =-spdiags (Full (sum (L,2) ),0, NV, NV) +L;end
Using discrete linear Laplace operators, the equations can be changed into sparse linear systems:
where p = (p1, ..., pp) is the seeking point within the computed domain, corresponding to the yellow point set;h = (H1, ..., HP) is the control point within the computed domain, corresponding to the red and blue point sets, which represent the boundary conditions in the equation. It is important to note that in order to satisfy the solved surface ck continuous, the control point set of the outer k+1 ring in the equation needs to be used as the boundary condition.
Figure: The K-order energy equation allows the surface boundary to satisfy Ck-1 continuous
Left: K = 1, medium: K = 2, right: K = 3
This article is original, reprint please indicate source: http://www.cnblogs.com/shushen
Reference documents:
[1] Mario Botsch and Leif Kobbelt. 2004. An intuitive the framework for real-time freeform modeling. ACM Trans. Graph. 3 (August 2004), 630-634.
High-order Laplace curved surface deformation algorithm (polyharmonic deformation)