taiya / dgp

Digital Geometry Processing - Fall 2016 - University of Victoria
38 stars 11 forks source link

As rigid as possible #24

Closed xuzheng0927 closed 7 years ago

xuzheng0927 commented 7 years ago

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. Then v_u and v_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 rotation R_i for vertex i. R_i is got by solving SVD of the covariance matrix (P_i * D_i * P'_i), where P_i has all cell i's edge vectors and D_i a diagonal matrix containing the weights w_ij. Question: here I use the original v_u / v_k to compute P_i, and use the initial guess to compute P'_i, is this correct?

(4), Then solve a linear system Lp'=b. Lp's is simply the Laplacian-Beltrami operator applied to p' (but without the area coefficient); b's ith row is sum(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 using v_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 new v_u (update P'_i but not P_i, is it correct?)

nlguillemot commented 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:

README.pdf

xuzheng0927 commented 7 years ago

I think it's helpful. Thanks a lot:)

xuzheng0927 commented 7 years ago

@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!

nlguillemot commented 7 years ago

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.

xuzheng0927 commented 7 years ago

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.