I'm not sure that the demo is really that complex. One important feature is that it's only 2D. The only real constraint is that the distance between the links is a constant value - let's call that value d.

So if point P1 moves, you have to ensure that P2 stays a constant distance d. So you calculate a line P1-P2, and place P2 on the line where the distance is d. For the remainder of the chain, solve for P2 to P3, P3 to P4, and so on.

Moving a link in the middle of the chain is similar - for P4, you solve for P3-P4 and P4-P5, and so on.

What would make the problem more difficult is if the ends of the chains were constrained, or if it were in 3D.