In this and the following activities we will be working with functions to draw an underwater scene. Once you finish each activity, make sure to save your work using the filename "YourName_Lesson8.10" (or whatever Lesson number it is). To do so, click on the "Save File" button next at the upper right of the Workspace, and then select "Blocks" under File Type and "Save file to cloud" under Location: To load a saved file, click the "File" button at the upper left of the RoboBlockly window and choose the file you want. NOTE: To save a file (either to the cloud or to your own local machine), you must have a RoboBlockly account. To sign up for a free account, click the "Sign In" button at the top right of the RoboBlockly window and then choose "Create an account."
|
Grid Size: S M L | Simple View: | MinView: |
|
Coord: x-axis y-axis | Grid Lines: x-axis y-axis | |||
Grid: | 12x12 inches | 24x24 inches | 36x36 inches | |
72x72 inches | 96x96 inches | 192x192 inches | ||
1x1 inches | 2x2 inches | Fraction: | ||
xy-Range: | ||||
|
||||
|
||||
Quad: | 1 Quadrant | 4 Quadrants | 1&4 Quadrants | |
Units: | US Customary | Metric | Ruler: |
Labels: |
|
|
|
Font
px
|
|
Tics Lines: |
|
Width
px
|
Hash Lines: |
|
Width
px
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
(
,
in
) in
|
|
degrees
|
|
|
The pre-placed code defines several functions (drawFish, drawStar, and drawGrass). Scroll down and examine the code to get a feel for it, and run it to see what it does. Then add a function call to draw another fish at the point x = 24, y = 30, and add function calls to the drawStar and drawGrass functions before running it again. When done, set the grid to "off" for the final display. Save your work using the filename "YourName_Lesson8.10" (instructions above). |
|
|
|||||||||||
|
|||||||||||