Question: Consider the following Processing program that draws a circle which travels from top to bottom and finally disappears from the screen. int y = 10;
Consider the following Processing program that draws a circle which travels from top to bottom and finally disappears from the screen.
int y = 10; void setup() { size(480, 270); } void draw() { background(255); stroke(0); fill(175); ellipse(width/2, y, 20, 20); y++; } Question) Modify the above program so that the circle (with a black fill) bounces back on reaching the 3/4th of the height of the screen and keeps on performing the same behavior (i.e., from top to 3/4th of the height of the screen and back to the top and so on). Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
