Change the Frequency and Amplitude variables, and press space. To try some different variables just click the green flag again. In real life the frequencies would usually be a lot larger, but my eyes start to hurt after watching anything much higher than 2. The amplitude is, of course, pixels, not metres. Please Love and Fave, I worked quite hard on the formulas. Thank-you.
I am going to be making a compressional waves project as well, and I will put the link here.