Look at the easing equations
http://www.gizma.com/easing/
when you release the screen while dragging the last image, you can use them to smoothly animate the image back to the center of the screen.
As for the effect when dragging the last image, use the multiplication factor at the image position, so the more your finger reaches the side of the screen, the less the image will follow its movement.
source share