I was reading paper about Position Based Dynamics to solve linear (elastic) constrains between bodies in a physics game engine. There is stressed that conservation of linear momentum must be ensured by displacing the bodies (end-points of the constraining bond) by displacement inversely proportional to mass of the points (as shown on Figure 2).
Now I'm reading a different paper Vivace: a Practical Gauss-Seidel Method for Stable Soft Body Dynamics. Here they show that much more efficient algorithm can be implemented using Gauss-Seidel parallelized on GPU using red-black coloring.
How I understand Gauss-Seidel Algorithm in the context of points connected by rigid/elastic sticks can be expressed by following pseudocode:
repeat until convergence:
for all points i:
displacement_i = 0
for all points j bonded to i by a stick with relaxed lenght L_ij:
d = position_i - position_j
l = |d| # length of the stick
h = d/|d| # normalized direction of the stick
dl = L_ij - l # how much the stick needs to be elongated/shortened
displacement_i += h * dl
position_i += displacement_i
What I don't understand: when I do update position of the point i by Gauss-Seidel (in the outer for loop), it moves the point i asymmetrically to satisfy the constrain, while it does not move the neighboring points to which it is connected (i.e. it does not exert the recoil according to 3rd Newton Law). Therefore the result will depend very much on the order in which I update the point positions.
If I choose the order badly, it can easily happen that I displace the heavy points a lot and displace a light points a little. For example consider that I have just 2 points connected by one stick (mass_1 >> mass_2). According to the algorithm above I solve the constrain in 1 step by displacing point_1 so that it is exactly at distance l=L_12 from point_2. However such solution would be unphysical because it will move the heavy point and not move the light point. The center of mass will move a lot, and conservation of the linear momentum will be violated.