expWave1: modified to resize the canvas properly when the window is resized