Open Hasnat-Khan opened 11 months ago
I also encounter this problem. Have u figured it out?
For the first one please check your derivative again (see the recall part in Matrices section in Readme). It should also be n by n. For the second part yes y remains constant because only b is dependent on d which is changing during iterarions. (This is also how I implemented that and it works somehow.)
As I apply the formula in Recall section, since Y is wC^T C and x is p, the Y in the formula is an nxn matrix and x is nx3 matrix, it still gives me an n by 3 matrix instead of an n by n matrix. I am not sure what assumption I have ignored or misunderstood?
We are adding an additional quadratic energy term so that means you have to add it to the original energy term and do the optimization. In other words, you'll have Qp = b -> (Q+...)p = b + ... Is that clear?
Can you elaborate more? I am trying to understand, but don't get how is your equation related to the dimension of the derivative of the quadratic term
I meant you just take the derivative with respect to p and combine the terms that multiply with p... So that's why it has and should have the same dimension as Q.
Ok I got it to work, but I don't think its explained very well in the tutorial notes or the assignment page. The trace also makes it even more confusing. I basically just added both the pinned vertex terms to the last line, combined them into 2 traces again, one term combines with the Q term and one term combines with the b term. I just assumed you can combine 2 traces together, since its just the sum of the diagonal. And then I took the derivative. It does not sound like this is at all what we were supposed to do, but it did work and makes much more sense to me, so maybe it'll work for you too @junior-stack ?
This is exactly what you are supposed to do. (Also you don't have to combine the trace before doing the derivative)
Oh I see it now! I guess it was confusing because it says to take the derivative, and add that entire quadratic term (including the p) to Q instead of adding it to this optimization problem, which would factor out the extra p.
Thank you! Your comment about how we are adding an additional penalty energy term is what helped me understand!
I am very confused about how to add the quadratic term of the pinned vertices to the Q matrix. I calculated the derivative of the quadratic term, and since
p
is anx3
matrix, the size of the entire derivative isnx3
. But the size of the Q matrix isnxn
so I'm not sure how I'm supposed to add them together.Second, the assignment notes say to add the linear term to
b
and it also says so in the tut handout, but in the image it shows it being added toy
instead ofb
. Isy
just the part ofb
that remains constant for all the iterations, so we can just add it toy
, or is there a mistake and we should add it tob
?