Challenge: Many waves
Draw waves that move across the canvas.
Draw the wave!
Hint
Wave.prototype.draw = function() {{
var = this.startAngle;
fill();
for (var x = 0; x <= width; x += ) {
var y = ;
ellipse();
+= ;
}
};
This program defines a Wave object, so that we can create multiple waves with different periods and
amplitudes easily. Like we did in our example, display the wave as a series of ellipses moving across the
screen.