Water Ripples Passing through a Slit
This Demonstration of single slit wave diffraction uses a finite differences method with Dirichlet boundary conditions.
The procedure is very simple, with surprising results, and is used to represent fluids in video games . It is based on the fact that the wave equation (a second-order PDE) can be rewritten as a system of two first-order PDEs
for which a possible discretization is
An implementation with some variations can be found at , with an updating scheme is based on : given two arrays, for the time and representing . From an element in , the sum of the four neighbors that appear in the discretization of a component in is subtracted, giving an updated value for , with the exception of positions at the walls. A CFL constant (Courant–Friedrichs–Lewy condition) is necessary to ensure stability.
 M. Müller. "Real Time Fluids in Games." (Nov 29, 2012) www.matthiasmueller.info/talks/gameFluids2007.pdf.
 P. Nylander. "Fluid Motion Simulations and Artwork." (Nov 29, 2012) www.bugman123.com/FluidMotion/index.html.
 H. Elias. "2D Water." (Nov 29, 2012) freespace.virgin.net/hugo.elias/graphics/x_water.htm.