I'm trying to produce wave surface animations, and I came across this paper: Fast_Water_Animation_Using_the_Wave_Equation_with_Damping. In the paper they go to provide the following equation:
At first I just blindly implemented this, but soon saw some strange bugs I realized weren't from me. When you evaluate the equation, say, with delta t = 1/60, delta x = 1, c = 0.01, and k = 1.0, on a grid with all zeros except the center point, you realize there's something off about this. If you are at that center grid point, and say your value is 1.0, the acceleration component( the delta t^2 stuff in the above equation) is positive when you assume all the surrounding neighbors are zero. That makes no sense. Peaks in waves do not accelerate upwards when the values around them are smaller. And further more, normally when I see finite difference of the laplacian, it is the average of the surrounding samples minus the current sample.
This is what I changed the equation to:
Was this just some pervasive typo or am I completely missing something here?