dilevin / computer-graphics-mass-spring-systems

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

Confused about fast_mass_springs_step_dense.cpp #31

Open RudainaK opened 9 months ago

RudainaK commented 9 months ago

in each iteration we need to find d, is that just a matrix that has the direction from rest_position to current_position? I feel like that's wrong because b is supposed to change multiple times per iteration. I'm honestly not even sure if my question makes sense, I'm very lost at what d is supposed to be.

Thanks in advance

johnnyjly commented 9 months ago

b is #b list of "pinned"/fixed vertices as indices into rows of V so it should not change during iteration. If you meant b in the formula, then yes it's changing because d is changing. d does not have the direction from rest_position to current_position but instead the direction of pi-pj (direction of spring ij) with the length of r. You may check the readme and tutorial file for more info. (I just followed the instructions there.)