Lesson 2: Drawing Shapes

Lesson Description

In this lesson, you will learn about shapes. Understand how to use Pen Extension blocks to draw shapes on the stage. Learn how to draw a Square and a Triangle with PictoBlox.

Shapes

A shape is an external form, boundary, or outline of an object. Different shapes include circles, rectangles, squares, triangles, ovals, stars, diamonds, and pentagons.

 

  1. Circle: is a closed two-dimensional figure in which the set of all the points in the plane is equidistant from a given point called “centre”.
  2. Rectangle: is a closed 2-D shape, having 4 sides, 4 corners, and 4 right angles (90°). The opposite sides of a rectangle are equal and parallel.
  3. Square: is a two-dimensional plane figure with four equal sides and all four angles are equal to 90 degrees.
  4. Triangle: is a three-sided polygon that consists of three edges and three vertices.
  5. Pentagon: is a geometrical shape, which has five sides and five angles. Here, “Penta” denotes five, and “gon” denotes angle.

Pen Extension

The pen extension allows sprites to control their pens, as well as stamp themselves onto the stage and remove all pen marks. The pen extension has the following blocks which are of our interest:

  1. Pen down – The block will make its sprite continuously pen a trail wherever it moves until the Pen Up block is used. The colour, size, and transparency of the trail can be changed with other blocks.
  2. Pen up – If a sprite is currently using the pen because of the Pen Down block, then this block will cause the sprite to stop drawing a trail.
  3. Erase all – The block removes all marks made by the pen or stamping. It is the only pen block that the Stage can use.

Activity 1: Drawing Square

In this activity, we will draw a square shape using PictoBlox.

Coding Steps

Follow the steps below:

  1. Open PictoBlox App, go to My Space, and click on the + button to create a new file.
  2. Add a new backdrop named Xy-grid. You can refer to the process of adding the backdrop from Lesson 1 Activity 2 Step 2.
  3. Add a new sprite named Pencil. You can refer to the process of adding the sprite from Lesson 1 Activity 2 Step 3.
  4. Delete the Tobi sprite by clicking on the sprite and selecting the delete option. You can refer to the process of deleting the sprite from Lesson 1 Activity 2 Step 4. You will have the following scene with you on the stage.
  5. Editing the costume: The Pencil tip is not at the centre, so we need to edit the costume.
    1. Click the Pencil sprite and you will see the edit button popup. Click the Edit Sprite.
    2. You will see the Sprite Settings. Under it select Costumes. You will see the buttons to edit the costume on the bottom left. It’s the second item. Click on it.
    3. Select the full costume by clicking on one end of the editor and dragging across the costume. The pencil will get highlighted. Now, we can move the pencil around.
    4. Click on the pencil and drag it in such a way that the tip of the pencil overlaps the center dot on the editor. After aligning them release the pencil.
    5. Go back to the project editor.
  6. Pen Extension: To make any shape on the stage we are going to use the Pen extension.
    1. Click on the Add Extension.
    2. Find the Pen Extension and click on it to add it to the project.
    3. You will find the Pen blocks added to the Block Palette.
  7. Making the Square using Script:
    1. Open the Events palette and drag and drop the when flag clicked block into the scripting area.
    2. Next, open the Control palette and drag and drop the repeat block below the when flag clicked block. This block is used when you want a set of blocks to keep running for a specific time. Because we are making a square, we need to run a repeat loop four times.
    3. Place a pen down block above the repeat block from the Pen extension to draw the square.
    4. After this just go to the Motion palette and drag and drop the move 100 steps. 
    5. Then put the wait block for 25 seconds.
    6. Lastly, add the turn clockwise 90 degrees block from Motion palette. We need to put these three blocks between the repeat loop.
  8. Click the green flag to start the animation.
  9. Save the file as Square.

Activity 1: Output

Activity 2: Drawing a Triangle

To draw an equilateral triangle, you must repeat the same actions three times. First, move in one direction. Then, wait for a specific amount of time. Finally, turn clockwise 120°. This process needs to be repeated three times, instead of four, because a triangle has three sides.

Coding Steps

Follow the steps below:

  1. Continue with the last project.
  2. Edit the parameter in the repeat block to 3.
  3. Edit the angle in the turn clockwise () degrees block to 120.
  4. Click the green flag to start the animation.

Activity 2: Output

Explore

Try creating other shapes:

  • Pentagon
  • Hexagon
  • Circle

Make sure you finish and submit the assignment, as well as take the quizbefore moving on to the next lesson.

 

Table of Contents