I have a hard time wrapping my head around implicit Euler formulas for a Mass Spring System and more specifically, the Jacobian Matrix computation and the final formula that needs to be solved. So if you guys could point out anything I didn't get right I would be immensely grateful.
Here is what I think I understood :
- There are two Jacobian Matrices, one for the Spring Stretch Force and one for the Spring Damping, both following the following structure https://i.stack.imgur.com/i1fqT.jpg (With N the number of particles in the system)
Each particle Jacobian is computed the following formulas :
- For the Stretch force Jacobian Matrix : $$\frac{\delta f_i}{\delta x_j} = k_s \cdot u_{ij} \cdot u_{ij}^T$$ (This is actually not the full formula found in the sources, but my teacher told me I could implement this one at first)
For the Damping force Jacobian Matrix :$$\frac{\delta f_i}{\delta x_j} = k_d \cdot u_{ij} \cdot u_{ij}^T$$
$k_d$ and$k_s$ are respectively the damping and the stiffness of the spring.
- $u_{ij}$ the vector between the two particles of the spring.
- As for the diagonals of both the matrices, I saw that it was the sum of all the particle jacobians connected to that particle so $\frac{\delta f_i}{\delta x_i} = \sum_j \frac{\delta f_i}{\delta x_j}$, but I am really unsure about this one.
- Connected particles have $\frac{\delta f_i}{\delta x_j} = -\frac{\delta f_j}{\delta x_i} $
And here are all the sources I read if that could help: http://blog.mmacklin.com/2012/05/04/implicitsprings/ http://hugi.scene.org/online/hugi28/hugi%2028%20-%20coding%20corner%20uttumuttu%20implementing%20the%20implicit%20euler%20method%20for%20mass-spring%20systems.htm
Thank you for your time !