So I basically have to create the exact sketch/animation as depicted in the gif.
I attached a gif of exactly how it needs to look and animate (you may need to refresh page in a few minutes because I think the gif stops moving after a few minutes.) So, I’m having a hard time mainly figuring out how to make some of the curves different sizes (similar to the gif). In my code that I have now, all the curves are at the same y axis level and not similar to the gif. I’m not just looking for the answer, I genuinely want to understand and learn how it’s done. So I’m looking to how I can get the finishing results! Someone please help me!
The code that I have so far is:
int numPts = 300;
size(400,400);
background(0);
noStroke();
fill(255);
for(float i = 1; i <= numPts; i++) {
float y = sin(i/15);
ellipse(i * width/numPts, height/2 + 50 * y, 10, 10);
}