Research Article
Crowd Motion Editing Based on Mesh Deformation
Algorithm 1
Deformation solution process.
Precondition: the user input the threshold. | (1) Initialize | (i) Calculate in Equation (2), where is the ratio of the perimeter of the th triangle to the th side of this triangle. | (ii) E1 =0. E2 =0. The number of iterations: iteration =0. | (iii) The vertex of the hull is equal to it before calculation:. | (iv) Calculate of each triangle in the mesh:. | (2) Terminal condition of the algorithm: abs (E1 – E2) <= threshold && iteration >=2 | Calculation steps | (i) While abs (E1 – E2) > threshold || iteration <2: | (1) Calculate according to ; | (2) Compute the rotation estimation matrix in Equation (2) of each triangle in the mesh. Let , , ; | (3) According to the user's demand to solve the target Equation (1) or Equation (7) | (4) Save the value of previous target equation. For E1 = E2, the calculation results assigned to E1; | (5) Iteration = iteration + 1; | end while |
|