Old code from 2016. Not being actively maintained for now.
Contributions are still welcome, though.
https://youtu.be/Vwf6FZaxdDY
The cord is approximated by a finite number of points connected by damped harmonic oscillators (real springs). The color of each small segment signifies the fractional extension of its length (and hence the elastic tension in it).