dilevin / computer-graphics-mass-spring-systems

Computer Graphics Assignment – Mass Spring Systems
1 stars 2 forks source link

Penalty Coefficients #27

Open Tomas-Ha opened 11 months ago

Tomas-Ha commented 11 months ago

26 mentions a similar issue. The README states that we simply take the quadratic and linear portions of this equation:

284356761-da034f75-e299-4e75-bc04-577bd6fcaf76

And add it to either Q or b (quadratic or linear, respectively). First, is the LHS the quadratic portion and the RHS the linear portion? What would the constant be? More importantly, the tutorial slides mentioned differentiating it. If we differentiate it, which portion do we add to Q and which portion do we add to be. How would we differentiate this. Below is the slide:

Screenshot 2023-11-20 at 1 33 28 PM

Finally, when it says we add to Q and b, do we have to do this in precomp AND step or just in step? Any advice would be helpful

panuelosj commented 11 months ago

The LHS expands to the RHS so you don't need to look at the LHS at all. Remember that you get Q, b by taking the derivative of the energy with respect to p. This means that you also have to take the derivative of this pinned energy to get the terms to add into Q, b. If you're taking the derivative, what happens to the constant term? To differentiate this, an identity was given in the readme. For implementation, where do you implement Q and b respectively?