Begin with a new graphics project.
Copy the following code into the main.cpp file:
using namespace std;
int counter = 0;
if (keyCode == keySPACE)
cout << “Starting graphics.n”;
startGraphics(600, 400, “Exercise”);
cout << “Window closed.n”;
For each task below, place the commands inside the corresponding function — Task1(), Task2() or Task3().
Draw a simplified “scene” in the graphics window by using multiple drawing commands. You must:
Use at least 3 different kinds of shapes
Use at least 3 different colors
Label the picture with a word or phrase that describes what it is (e.g., “house”, “landscape”, “robot”, etc.)
Using a for loop, draw a set of concentric circles. Each circle should have its center at the center of the window. The radius of each circle should be a multiple of 10, with the smallest having radius 10 and the largest having radius 300. The color is up to you. The result should look similar to this:
Using a for loop, draw a set of filled rectangles on the screen using random colors, similar to the picture below. Each rectangle needs to have a width matching the width of the window and a height of 20, and the y positions span all possible y values on the window in steps of 20.