Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In this case, I just want to know.. Do I need to use for loop? give me some example to do this. Thanks ( This
In this case, I just want to know.. Do I need to use for loop? give me some example to do this. Thanks ( This one is Processing 3+)
Basic setup a. window size: (500, 200) b. frameRate: 10 c. background: black In the setup method, generate random numbers for the red, green, blue factor of the fill color of each circle (i.e., 3 float values for each circle). Use 255 as the input value for the random method. . a. Draw the following three circles with the random colors generated. Circle 1 (center: (100, 100), W: 100, H: 100) b. Circle 2 (center: (250, 100), W: 100, H: 100) Circle 3 (center: (400, 100), W: 100, H: 100) c. . Compute the intensity of the fill color of each circle in the setup method. The intensity of a color is simply the arithmetic mean of the R, G, and B value of the color. We will use an integer value (0 - 255) for the intensity. So, you will need to cast the arithmetic mean (float data type) to an integer. Print the color values of the circle 1, 2, and 3 to the console. You will print 3 lines where the computed intensity value appear in each line. . Keep the circle with the maximum intensity on screen and make the other circles slowly faded out over time. You will use the fade-out trick discussed in lecture - i.e., draws a rectangle that covers the entire canvas with low transparency value in the draw method. Note that it is possible to keep two or three circles when their intensity values are identical. The following figure shows that the left circle is kept on screen and the other two are being faded out. brightest_circleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started