Question
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.
If your program fulfills the requirements for this assignment as described in the previous prove milestone and the Assignment section above, your program will earn 93% of the possible points. In order to earn the remaining 7% of points, you will need to write your drawing functions so that they correctly use parameters.
Consider the following draw_pine_trees function that draws three trees. It correctly draws three trees. However, it has only one parameter (canvas) but should have more. With only one parameter, the draw_pine_trees function is not easily reusable because it uses hard coded numbers for the coordinates at lines 5, 6, 10, 11, 15, and 16. Because of the way that the draw_pine_trees function is written, it can draw only three pine trees, and it will always draw them at the same locations. What if we decide to change the width and height of the scene? The draw_pine_trees function will draw pine trees in the same locations as before, but these may be the wrong locations in a larger scene.
This criterion is linked to a Learning OutcomeProgram draws an outdoor scene in a window |
| 10 pts | |||
This criterion is linked to a Learning OutcomeScene includes part of the sky |
| 10 pts | |||
This criterion is linked to a Learning OutcomeScene includes clouds in the sky |
| 10 pts | |||
This criterion is linked to a Learning OutcomeScene includes part of the earth's surface (ground, snow, or water) |
| 10 pts | |||
This criterion is linked to a Learning OutcomeBesides clouds, program drawn scene includes objects that are repeated, such as trees, blades of grass, fish, birds, or fence pickets. |
| 10 pts | |||
This criterion is linked to a Learning OutcomeProgram imports functions from the Draw 2D library |
| 3 pts | |||
This criterion is linked to a Learning OutcomeProgram calls functions in the Draw 2D library |
| 10 pts | |||
This criterion is linked to a Learning OutcomeProgram is divided into user-defined functions |
| 10 pts | |||
This criterion is linked to a Learning OutcomeUser-defined functions in the program, except main, have parameters. (Because main normally has no parameters, main is excluded from this grading criteria.) |
| 10 pts | |||
This criterion is linked to a Learning OutcomeEach instance of a repeated element is drawn by calling a function once. (The objective is for students to understand they can write a function once and call it many times to save themselves effort.) |
| 10 pts | |||
This criterion is linked to a Learning OutcomeCreativity |
|
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