create an animated array of lines of different length and at different spaces between them. Total width of the array of lines is 300px. The animation should expand and contract the lines vertically only and at different velocities, and then loop indefinitely. Animation should also ease in and out during each loop
function setup() { createCanvas(windowWidth, windowHeight); } function draw() { colorMode(RGB, 255, 255, 255, 1); background(0); for (var i = 10; i < width; i += 20) { noStroke(); fill(255); height = map(sin(frameCount*i/400), -1, 1, 300, 400); rect(i, height, 10, 10); } }