Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Langauage: Processing. Using Processing, write a sketch that draws three raindro

ID: 662435 • Letter: L

Question

Langauage: Processing.

Using Processing, write a sketch that draws three raindrops (circles) falling on the screen. Each should initially appear at some random location, but fully contained, in the output window. Each raindrop will fall to the ground (bottom of the screen). Allow them to completely fall through the bottom. Once a raindrop falls through the screen, it should reappear at a new random location that is somewhere in the top 1/4 of the output window, and then fall to the ground.
his repeats forever. Each raindrop should be a different colour. Each raindrop should have a different falling speed (not too slow and not too fast). Each time a raindrop appears at a new random position, its colour and speed should change.

Explanation / Answer

Rain r1; int numDrops = 40; Rain[] drops = new Rain[numDrops]; // Declare and create the array void setup() { size(600,600); background(255); smooth(); noStroke(); //Loop through array to create each object for (int i = 0; i