dilevin / computer-graphics-mass-spring-systems

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

Confusion with fast_mass_springs_step_dense.cpp #28

Open lob222 opened 9 months ago

lob222 commented 9 months ago

I am quite confused about how to use prefactorization input and also what b refers to. If this is the case... image

and

image

then is the optimisation just

argmin p (1/2) tr(p^Tb) - tr(p^Tb)?

panuelosj commented 9 months ago

Solving the linear system Qp=b will give the solution to the optimization given by the argmin equation. b is image

The prefactorization will perform the action of Q^-1. ie, you call prefactorization.compute(Q) to get something that performs Q^-1, then call prefactorization.solve(b) to get the result of Q^-1*b.