Quintuple pendulum

A quintuple pendulum is a string of five pendulums. In this case, we have five pendulums with equal masses and lengths. No friction is assumed in this model. One end of the string of pendulum is fixed. The string is pulled downwords by a gravitational field. Play with the various buttons. You can fix and then move the end point of the string. After moving this end point, you can release it again to let it swing freely again. Be aware, by moving this end point, the string can become over stressed!
A numerical simulation method is used. The principle idea is as follows: the masses move in accordance to Newton's laws. However, this movement is restricted by the fact that rods prevent masses to move where they would move without rods. The movement of the masses are subjected to the constraints imposed upon by the rods. These contraints restrict the movement of the masses in the direction of the connecting rods. The uncontrained movement must therefore be corrected. The calculation is done by considering a little time interval dt. Step 1: let all masses move during time interval dt as if there were no constraints (ie no rods). The masses gain a little speed (downwards). Step 2: usually, now the constraints are violated. The rods prevent that masses on both ends, have different speeds in the direction of the rod. By step 1, such a difference in speed could have been introduced. This must be corrected. This is realized by subtracting this difference speed from de velocities of both ends. This proces is repeated for all constraints. This entire proces then is repeated 4 times, in order to find the correction speeds for each mass with sufficient precision. Step 3: Calculate the new positions en velocities of the masses. Step 4: Go to step 1.