pen & shapes
In this lab, you will do some activities in Scratch to learn how to draw shapes using code. I will check each activity in class - no need to turn anything in yet. Eventually you will use your knowledge to create a custom picture and we will use the WatercolorBot to paint it on paper.
Before you start:
- Create a new Scratch project and name it Drawing Lab. You will do all the activities for this lab in the Drawing Lab project.
- Make your Scratch coding window and this Canvas instructions window side-by-side on your computer. I'll demo a quick way to do this in class, and ask me or a neighbor if you need help.
Activity 1: make a square 
Find the following blocks and put them together as shown below. This block of code is called a script.
Notice that we didn't use a block. We don't need it since we are just experimenting and don't really have a "beginning" of the project.
Click the script to run it. It doesn't make a square yet - talk with your neighbors to figure out what numbers you need to change to make it draw a square, then update the script and run it again. (100 steps is a reasonable size to use.)
Make sure you only draw the shape once, without drawing over any of the sides. The sprite should end up back where it started.
To clear the screen between drawings, you can click the clear block.
Activity 2: make a triangle 
Make a copy of the script from Activity 1 by right-clicking the top block and selecting duplicate. Change the numbers in this script to make it draw a triangle.
If your sprite ends up facing a funny direction as you experiment, you can make it face right again by clicking the point in direction block.
Activity 3: make a pentagon, hexagon, and octagon 
Duplicate the script from Activity 1 (or Activity 2, it doesn't matter which) THREE TIMES, and change the numbers to make scripts that draw a pentagon (5 sided figure), hexagon (6-sided figure), and octagon (8-sided figure).
Activity 4: make a circle 
Duplicate one of the scripts you made so far and change the numbers so that the script draws a circle. There are many number combinations that will work, just make sure the sprite goes around the circle exactly once.
Activity 5: customize the shapes 
Experiment with the blocks above to see what they do. You can right-click a block and select help for more information about the block.
You have two goals:
1. understand the difference between the set and change blocks -- experiment with putting them before the repeat block and inside the repeat block
2. use the blocks to make each of your shapes, and maybe even each side, look like it is drawn with a different pen (yours will probably look different than my example above, and you don't have to make the shapes "nested" together)
Activity 6: circle in a square 
Make a new script that draws a red circle in a blue square, as shown above.