dilevin / computer-graphics-mass-spring-systems

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

Where to put penalty coefficients #26

Open AlekseyPanas opened 12 months ago

AlekseyPanas commented 12 months ago
image

It says to put them to Q and b, but Im not sure how

Screenshot 2023-11-19 at 10 06 26 PM

I tried computing the trace of the quadratic term, trace of the linear term, and then doing alpha * Q = beta * b => Q = (beta * b) / alpha = Q.solve((beta * b) / alpha) but that didnt work. Im not fully understanding what to do here.

panuelosj commented 11 months ago

You don't include alpha and beta as they are. Remember that you get Q, b by taking the derivative of the energy with respect to p. This means you have to take the derivative of alpha and beta to get the correct terms to include. These become extra terms that get ADDED to Q and b (not multiplied).