Today you are coding in Scratch. You will build a Pattern Creator step by step at your device.
You can already make a sprite move and turn. Today you will put those actions inside a loop so the pen draws circles, lines and spirals without copying the same blocks over and over.
Before you run anything, think: what might happen if the sprite keeps moving and turning a little bit each time?
Keep the start short. Devices on Scratch, students logged in. Optional predict: before anyone runs code, ask what might happen if a sprite keeps moving and turning a little each time. Do not take long answers; park one or two ideas to revisit in make sense. Pairs at devices after this beat.
Welcome to our exciting lesson on Pattern Creation! In this lesson, you will learn how to create cool patterns using Scratch. You will learn how to code the pen tool and use variables to make your patterns more interesting. By the end of this lesson, you will be able to create your own unique patterns. So, let's get started!
This is the platform introduction screen. Read it lightly or skip aloud if time is tight. Remind students the real goal today is the loop that repeats move and turn, not a long read. Check everyone is on the editor before the next step.
Go to the Scratch website, create a new project and delete the cat sprite.
Model creating a new project and deleting the cat on the board. Watch for students editing an old project by mistake. Differentiation: support students who struggle with the site layout; extension students can rename the project now using the class naming rule.
We are going to use the Pen blocks to create patterns but first we'll need to add a sprite that will do the drawing. It doesn't really matter which sprite we use as we are going to hide it.
Add the Ball sprite from the sprite library and then give it the following code.
when green flag clicked
go to x (0) y (0) // we want to start it in the center
hide
Model adding the Ball sprite, the green-flag hat, go to centre, and hide. Key question: why hide the sprite if the pen is doing the drawing? Common bug: code left on the wrong sprite. Cue pairs to click the Ball thumbnail before they drag blocks.
To draw the patterns we will be using the Pen blocks so add the Pen Extension to your project.
Once you've added the Pen Extension add the following new code blocks to the Ball sprite underneath the hide block.
when green flag clicked
go to x (0) y (0)
hide // add new code under here
pen up // start with the pen up
erase all // erase drawings from the last time
set pen color to [#3438df] // choose a color
pen down // put the pen down
Show how to add the Pen extension once on the board. Stress order: pen up, erase all, set colour, pen down. Common mistake: pen down before erase all, so old marks remain. Ask why erase all belongs at the start of every green-flag run.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.