Mathematics Scratch Arts
Intermediate
60 mins
Teacher/Student led
160 points
What you need:

# Pattern Creator

This lesson guides students through the exciting process of creating unique patterns using Scratch. They will learn how to code the pen tool, use variables, and manipulate pen colour and size to create vibrant, complex patterns. The lesson encourages creativity and experimentation, fostering a deep understanding of coding principles.
Learning Goals Learning Outcomes Teacher Notes Lesson Files

### 1 - Introduction to Pattern Creation

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!

### 2 - Create a new Scratch project

Go to the Scratch website, create a new project and delete the cat sprite.

### 3 - Add the Ball sprite

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 ```

### 4 - Add the Pen Extension

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 ```

### 5 - Draw a circle

Now let's add some code to move the sprite. As the we set the pen to be down, moving the sprite will make the the pen draw.

We will make the sprite move and turn and by putting these instructions inside a loop block it will make the sprite go in a circle.

Add the following code to the Ball sprite underneath the pen down block to draw a circle.

``` when green flag clicked go to x (0) y (0) hide pen up erase all set pen color to [#3438df] pen down // add new code under here repeat until < touching [edge v] ? > move (5) steps turn cw (5) degrees end```

Click on the green flag and your code should draw a circle.

# Unlock the Full Learning Experience

Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

Copyright Notice
This lesson is copyright of Coding Ireland. Unauthorised use, copying or distribution is not allowed.

Scratch is developed by the Lifelong Kindergarten Group at the MIT Media Lab. It is available for free at https://scratch.mit.edu
🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more