I wanted the code below to change the squares into circles, change the background color, adding an horizontal movement to simulate wind and simulate that the circles don't get past the floor like they get stuck
var step = 50;
var w = c.canvas.width;
var h = c.canvas.height;
var cmTID;
var px = [];
var py = [];
var velx = [];
var vely = [];
var mida = [];
var i = 0;
var nquad = 350;
do {
px[i] = Math.floor(Math.random() * w);
py[i] = -Math.floor(Math.random() * h);
velx[i] = 0;
vely[i] = Math.random() * 2 + 3;
mida[i] = Math.floor(Math.random() * 5);
vely[i] = mida[i]/2 + Math.random() * 1.5;
i = i + 1;
} while (i < nquad);
drawStep();
function drawStep() {
c.clearRect(0, 0, w, h);
i = 0;
do {
c.fillStyle = "red";
c.fillRect(px[i], py[i], mida[i], mida[i]);
py[i] = py[i] + vely[i];
if (py[i]>350)
{
py[i] = 0;
}
i = i + 1;
} while (i < nquad);
clearTimeout(cmTID);
cmTID = setTimeout(drawStep, step);
}