Closed xuzheng0927 closed 7 years ago
I'm not sure if it helps, but here's the report I wrote after I implemented ARAP when I took this course:
I think it's helpful. Thanks a lot:)
@nlguillemot I think my understanding was correct. After fixing some bugs in my code I'm now able to get ARAP worked on the quad mesh object (not perfectly because half the edges are boundary edges). But still the output gets very messy on the woody object (similar to what I got in the 2nd part). So I doubt that it's something wrong within the data file. If that's the case, then I've no idea what I should do. Anyway I believe my code's logic is OK. Thanks for sharing your report!
I had a lot of math bugs while I was implementing it, and my results were getting better and better as I was finding and fixing them... so it might be a matter of looking closely at the numbers.
I'm looking through Laplacian matrix of woody (so tired!) and found in some slots the cotanSums are extremely large. See whether I can figure out what's going on.
I wish my understanding was correct:
(1) Pre-factor Laplacian weight matrix
w_ij
:0.5 * (cot_alpha + cot_beta)
. (No area value)(2), When the selected handle is moved, the new positions of the handle vertices are applied to
v_k
. Thenv_u
andv_k
are used as the "initial guess" (only the selected handle's positions are changed).(3), Compare the original
v_u
/v_k
with the ones from (1) and compute rotationR_i
for vertexi
.R_i
is got by solving SVD of the covariance matrix(P_i * D_i * P'_i)
, whereP_i
has all cell i's edge vectors andD_i
a diagonal matrix containing the weightsw_ij
. Question: here I use the originalv_u
/v_k
to computeP_i
, and use the initial guess to computeP'_i
, is this correct?(4), Then solve a linear system
Lp'=b
.Lp's
is simply the Laplacian-Beltrami operator applied top'
(but without the area coefficient);b
's ith row issum(w_ij/2 * (R_i+R_j)(e_ij))
for cell i. Question: can we use Cholesky to solve this linear system as well? Now I'm usingv_u = solver.solve(-L_uk*v_k + b)
, is this correct?(5) After solving
Lp'=b
, before carrying on with the next iteration, update the guess with the newv_u
(updateP'_i
but notP_i
, is it correct?)