I am currently working on creating a wind map that displays data from seven different weather stations. My goal is to develop a fluid and interactive map similar to the ones found in this animation or this animation.
In my research, I came across an article explaining how such visualizations are typically achieved using the Canvas 2D API. The process involves:
1. Generating an array of random particle positions on screen and drawing them.
2. Querying wind data for each particle to determine its speed and adjusting its movement accordingly.
3. Regularly resetting a portion of particles to prevent empty spaces where wind blows away from.
4. Fading the current display slightly and adding newly positioned particles on top.
Source
Despite understanding the general concept, I am struggling to grasp how the animations accomplished the following:
- Moving points across the canvas without affecting previously drawn items.
- Adjusting the opacity of existing points to create a disappearing effect.
If anyone has advice or guidance for a novice programmer like me, it would be greatly appreciated. Thank you for your help.