Just a basic spring physics simulation
Drag the red nodes around and watch as they spring back into place