The concept of my artwork is displaying the splash raindrops makes when it hits the puddle. I wanted circles to be created in random positions with different timings since not all raindrops drop at the same time.
First task: Creating a Circle in a random position
This task was fairly simple compared to the other one. I created my code in an object-oriented way by making an object named splash (which is stated as a function in the script). Then, I give two random variables that are used for the x and y coordinates of the circle.
for (i = 0; i < 20; i++) {splash[i] = new Splash(random(50, 350), random(50, 350), i*8);}
As a result, I create 20 circles that have random starting x,y coordinates.
Second task: Display the circle at different timing
It was challenging to find a way to make circles appear at different timings. The solution to this problem was to give different large number indexes to every circle that will constantly decrease until 0, and let them start to be drawn when the index becomes 0. This delays the initiation of drawing and results in displaying circles at different timing.