I'm confused by the Waves
class implementation in the source code of the book Introduction to 3D Game Programming with DirecX11:
float d = damping*dt+2.0f;
float e = (speed*speed)*(dt*dt)/(dx*dx);
mK1 = (damping*dt-2.0f)/ d;
mK2 = (4.0f-8.0f*e) / d;
mK3 = (2.0f*e) / d;
What do the parameters mean? How are the waves generated? I've tried searching waves implementation and found https://stackoverflow.com/questions/6716887/how-to-render-ocean-wave-using-opengl-in-3d , I looked up the links mentioned by the answer but I couldn't understand the complicated equations and it seems that the equations have no relation with the code above. I also tried searching "spatially damped wave", and then I found https://physics.stackexchange.com/questions/223366/wave-equation-with-spatial-damping, that didn't help me, neither...