This is a simple spring simulation. I've created a grid of springs, and to each joint points I attached the corresponding points of an image. We tested it on a multitouch table, so you could play with multiple fingers.
You can try this applet by pressing and moving the mouse over the image below. (to try this you need Java to be installed)