Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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. # Import the functions from the Draw 2-D library # so that they can be used in this program. from draw2d import \ start_drawing, draw_line, draw_oval, draw_arc, \ draw_rectangle, draw_polygon, draw_text, finish_drawing def main(): # Width and height of the scene in pixels scene_width = 800 scene_height = 500 # Call the start_drawing function in the draw2d.py # library which will open a window and create a canvas. canvas = start_drawing("Scene", scene_width, scene_height) # Call your drawing functions such # as draw_sky and draw_ground here. # Call the finish_drawing function # in the draw2d.py library. finish_drawing(canvas) # Define your functions such as # draw_sky and draw_ground here. # Call the main function so that # this program will start executing. main()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Implementing Ai And Machine Learning For Business Optimization

Authors: Robert K Wiley

1st Edition

B0CPQJW72N, 979-8870675855

More Books

Students also viewed these Databases questions