Example 1
- Link to exercise
- The color keeps changing because the color is being randomly picked over and over again. The fill color is set to random, and because the draw() function repeats continuously, it’s filling the circle with a random color repeatedly.
Example 2
- Link to exercise
- I removed the trail by adding a background function to draw() so that it refreshes the background in each frame. I also increased the speed at which the circle moves by increasing the amount added to X with each new frame.
Skyline