Next we will add a more advanced effect. We will take the image and distort it with waves to make it look like a reflection in the water. We can do this using the
Math.sin() method to offset the pixel positions from their original positions in a wavy pattern. So instead of changing color channels, this time we will be moving pixels around.