Closed xuzheng0927 closed 7 years ago
I think it should be L_square_permute = permute * L_square * permute.transpose(). But the PermutationMatrix is too annoying, I cannot do the above computation whatever I tried.
We did it today in class, I hope your question in answered ;)
The slides look a bit brief so not sure if I'm following the right logic. In the function
factor_matrices
, I'm doing:1, Get Laplacian matrix (either uniform or Beltrami). 2, Multiply the Laplacian matrix by itself to get the squared Laplacian. 3, Permute the (squared) Laplacian matrix by multiplying it with
permute
(permute the rows). 4, Getblock(0,0,u,u)
asL_uu
andblock(0,u,u,k)
asL_uk
. 5, Permute the vertex matrix, then get the first u vertices asv_u
and the rest asv_k
. 6, Use the Cholesky solver to computeL_uu
.Then when the mouse is being dragged, I'm doing: 1, Compute the current barycenter of the selected handle, and the displacement between it and the cursor position. 2, Translate all the selected handle's vertices using the displacement by adding the displacement to
v_k
(only to the selected handle's vertices). 3, Use the Cholesky solver to solve-L_uk*v_k
, then save it as the newv_u
. 4, Writev_u
andv_k
as the new vertices byvertices_matrix(mesh) << v_u, v_k
.Is the above logic correct? Right now I'm only getting a pile of exploding points, and I wonder what is going wrong.