This is so pleasing to look at, right? And you may think this could be a bit hard to implement that may have some bitter physics or math involved. But don’t be scared, let’s see the moving path of the particles first:
You will quickly find out that every particle is just moving on a circle with the exact same speed. Each of them has a slightly different offset against each other. And that’s it. As the Exploratorium explains, “Wave motion at the surface of water is made up of small circular motions of parcels of water.”
When you are all done, post your work on Twitter with the hashtag #codecember and #day16. Remember to include a link to the source code, so others can learn from your creation. We look forward to seeing your sketch!