I loved playing around with this kind of water simulation when I was younger, the basic principle behind it is very simple. Spent many hours optimizing C++ and OpenGL code.
I still haven't figured out though how to stop wave reflection at the edges though...
The trick is to perform damping around the edges in a hidden border around the heightmap.
Say you wanted to simulate a 500x500 heightmap. You would actually calculate the results for a 700x700 heightmap, (which contains a hidden border of width 100 around each edge). The hidden edges are slowly damped away by multiplying by a factor interpolated between 1 (on the inner edge of the visible part of the heightmap) 0 (on the very outside of the heightmap).
This works remarkably well; you can see this approach in action in http://www.falstad.com/ripple/ for instance. Source code is included on the page.
Thanks for the answer, I actually tried something like that but it never worked out completely. There always was a small residual amount of noise that prevented simulating a true infinite pool. I tried to come up with the necessary equations for the pool margins so that I wouldn't need a hack, but couldn't figure it out. One of those days I will!
This is just pure awesome. It is so awesome, that I was jealous of the author for not being able to do this first, I almost didn't upvote it out of that jealously--it's that good. Keep up the good work!
(I'm working on hacking together sims myself but for a larger project--I'm part of a computation group at some state uni modeling HED plasmas.)
The movies at the bottom of the page are great, and if you want to see how it's done, his papers give a thorough and rigorous explanation that is easy to translate into code.
Yes it is very similar, it sets the value at that grid point to its maximum height. This causes the neighboring grid cells to react accordingly (Laplacian in space), giving the rippling effect.