Gravitas is a collection of equations for making UI elements move in response to touch gestures.
There are also implementations for Java and JavaScript (which has some interactive examples).