Question
The Draw 2-D library contains functions that draw shapes on a canvas in a computer window. To use the Draw 2-D library, your program must
The Draw 2-D library contains functions that draw shapes on a canvas in a computer window. To use the Draw 2-D library, your program must do the following: Import the librarys functions Call the start_drawing function once. The start_drawing function returns a canvas, that your program must pass to each of the draw_* functions. Call the draw_line, draw_oval, draw_arc, draw_rectangle, draw_polygon, and draw_text functions as many times as needed. The draw_* functions accept Euclidean coordinates that determine where a shape will be drawn on the canvas. The origin of the canvas (0, 0) is in the lower left corner of the canvas. Call the finish_drawing function once. During the previous lessons milestone, you wrote code to draw at least the sky, clouds, and ground of an outdoor scene. During this lesson, you will write code that draws the remaining objects in your scene. Your program can draw any outdoor scene that you like as long as it meets these requirements: The scene must be outdoor and include part of the sky. The sky must have clouds. The scene must include repetitive objects, such as blades of grass, trees, leaves on a tree, birds, flowers, insects, fish, pickets in a fence, dashed lines on a road, buildings, bales of hay, snowmen, snowflakes, or icicles. Your program must be divided into functions such as draw_sky, draw_cloud, draw_ground, draw_bird, draw_flower, draw_insect, draw_fish, or draw_snowman. Each repetitive object in your scene should be drawn by a function that your program calls repeatedly, once for each repeated object. For example, your program could include a function named draw_leaf that your program repeatedly calls to draw each leaf on a tree at a different location. As you write your program, write it so that it draws objects in the order of farthest away to nearest. For example, you program should draw the sky first, then clouds, then the ground, then trees, then insects in the trees. Be creative.
Step 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