Session 2 Drawing Shapes
Drawing Shapes
"Shapes are the first steps in designing, coding, and creating — every square, circle, and triangle tells a story of imagination and logic." 🟦🔺🟢
Introduction
Pictoblox is a graphical programming platform based on Scratch, designed to introduce students to coding through interactive activities. In this lesson, students will explore how to draw geometric shapes like squares and triangles using Pictoblox Pen Extension. This activity fosters an understanding of basic programming concepts such as sequencing and iteration, while integrating mathematical principles.
Learning Objectives
By the end of this lesson, students will be able to:
- Understand the concept of sequencing and how it applies to programming.
- Use loops to create repeated patterns in code.
- Utilize the Pen Extension in Pictoblox to draw shapes.
- Apply mathematical knowledge of angles and sides to program shapes accurately.
Prerequisite Knowledge
- Basic Computer and Pictoblox Skills
- Basic Geometry Concepts
- Introduction to Loops
-
Basic Event and Pen Blocks
Pen Extension:
The Pen Extension is a feature in Pictoblox that allows sprites to control a virtual pen. With this extension, sprites can draw lines, stamp images, and clear drawings on the stage.
Pen Extension Blocks
We will be using the following blocks from the pen extension.
- When you run the pen down block, you enable a mode where, whenever the sprite moves, it will draw lines on the stage.
- When you run the pen up block, you enable a mode where the sprite does not draw while moving. To erase all the lines, we will use erase all blocks.
Requirements
To participate in this lesson, students will need:
- A computer or tablet with Pictoblox installed.
- Basic familiarity with the Pictoblox interface.
- Understanding of geometric shapes and their properties.
- Access to the Pen Extension within Pictoblox.
Let’s Code:
:
🔷 Activity 1: Let’s Draw a Square!
Follow the steps below:
Step 1: Create a New file in Pictoblox.
Step 2: Click the Choose a Backdrop button. Select the xy-grid backdrop from the library.
Step 3: Click the Choose a Sprite button. Select the pen sprite from the library.
Step 4: Right-click on the Tobi icon in the sprite palette and delete it. Your stage is all set for coding.
Step 5: Add the pen extension.
Step 6: After that, write the below code by selecting the pen sprite-
Step 7: Click the Green Flag to run the script.
🔷Activity 2: Let’s Draw a Triangle!
A triangle has three sides instead of four. There are different triangles and different ways of drawing a triangle, but we’ll stick to the easiest one: the equilateral triangle.
Step 1: Choose pen Extension
Step 2: Add a pen down block.
Step 3: Next, to draw the triangle, add a repeat block and write 3 in the space given.
Step 4: Add a move () steps block under the repeat block.
Step 5: Next, add a delay of 0.25 seconds using a wait () secs block
Step 6: Then, add a turn () degrees block and write 120 in the space.
Step 7: Finally, add a when () key pressed hat block above the entire script and select any key of your choice from the drop-down. We're choosing the d key.
Step 8: Click the Green Flag to run the script.
Learning Outcomes
Upon completion, students will be able to:
- Create programs that draw squares and triangles using Pictoblox.
- Demonstrate the use of loops to repeat actions in code.
- Integrate mathematical concepts with programming to solve problems.
- Enhance their computational thinking and problem-solving skills.
There are no comments for now.