A Better Ripple Effect. Now with source code!

I wanted to make a ripple effect that distorted the image more realistically. The trick is coming up with the right displacement map. In the displacement map, one color channel controls x-axis displacement and another controls y-axis displacement. Here is an example of what I came up with. This is generated algorithmically.
Displacement Map

Download the source code.