Coding to the day 15 prompt of "Sine waves" from genuary.
This is my first time playing with sine waves in code, ever. Never had to use this at work nor at play. Frankly I had forgotten almost everything I'd learned from school about these things. Thankfully Daniel Shiffman got us covered! I used the video linked below as a primer.
What's happening here is that I use a sine function on an angle variable (init to 0), which will return a value from -1 to 1. I increment the angle by roughly 0.1 with each draw cycle and calculate the new position of the dot. And since I already have a beautifully smooth varying number to use for position, I also used it to determine the dot's size between 0 and 10px. Lastly, I used a nested loop to create a lot more dots!
Resources referred to while creating today's project: