- Learnt28 min · repeat with a turn, copies × turn, a flower block
- Basic24 min · a rainbow flower
- Challenge 1–327 min · three flowers, a mandala, a flower of stars
- Extrabonus · plant a garden
Review — Lesson 6 5 min
- A star is a shape where the arrow goes round more than once.
- The spikiest star turns 180 − (180 ÷ points).
- A colour change inside the loop gives every line its own colour.
Quick-fire
Your polygon block turns the arrow all the way round. Which way does it face at the end?
Reveal the answer
The same way it started. 360 degrees is one whole turn. Today that matters a lot: it means the next shape starts from a known direction.
Today’s Topic 3 min
- Draw a shape, turn a little, draw it again
- The copies rule — copies × turn = 360
- A
flower (petals) (sides) (size) :: customblock that uses your polygon block - Taking a wait out, because the drawing got too slow
Learning outcome
By the end of this lesson you will be able to:
- Make a pattern by repeating a shape with a turn between.
- Work out the turn that makes a pattern close up.
- Build a My Block that calls another My Block.
Learnt — patterns that go all the way round 28 min
1 · One petal, then twelve
Draw one hexagon from the middle of the Stage. The arrow ends facing the way it started. Turn it 30 degrees and draw the hexagon again. Do that twelve times.
repeat (12)
polygon (6) (45) :: custom
turn cw (30) degrees
change pen (color v) by (8)
end
How to use this: Click the green flag. One petal is drawn, the arrow says so, then the other eleven follow.
2 · The copies rule
The pattern closes up when the turns add up to one whole turn. So: copies × turn = 360, or turn = 360 ÷ copies. It is the 360 rule again — this time for whole shapes instead of sides.
| Copies | Turn between |
|---|---|
| 4 | 360 ÷ 4 = 90 |
| 6 | 360 ÷ 6 = 60 |
| 8 | 360 ÷ 8 = 45 |
| 12 | 360 ÷ 12 = 30 |
How to use this: Click the green flag. Three patterns: 4 squares, 6 triangles, 8 pentagons. Watch copies and turn.
3 · A flower block
Wrap the pattern in a block with three inputs. Inside, it calls your polygon block — a block can use another block.
define flower (petals) (sides) (size)
repeat (petals)
polygon (sides) (size) :: custom
turn cw ((360) / (petals)) degrees
change pen (color v) by ((100) / (petals))
end
Basic — a rainbow flower 24 min
Open your project. Keep the polygon block.
Step 1 — speed up the polygon
- Find your define polygon hat.
- Drag
wait (0.1) secondsout of it and delete it.
Step 2 — the flower block
- Make a Block called
flowerwith three inputs:petals,sidesandsize. - Inside:
repeat (petals). - In the repeat:
polygon (sides) (size) :: custom, then the turn, then the colour change.
Step 3 — draw it
- Under the flag:
erase all, pen size 2, a pen colour. - Travel to x: 0, y: 0, facing 90.
flower (12) (6) (45) :: custom.
define polygon (sides) (size)
repeat (sides)
move (size) steps
turn cw ((360) / (sides)) degrees
end
define flower (petals) (sides) (size)
repeat (petals)
polygon (sides) (size) :: custom
turn cw ((360) / (petals)) degrees
change pen (color v) by ((100) / (petals))
end
when flag clicked
erase all
set pen size to (2)
set pen color to [#ff4fa3]
pen up
go to x: (0) y: (0)
point in direction (90)
pen down
flower (12) (6) (45) :: custom
How to use this: Click the green flag and watch the flower grow petal by petal.
My flower has a gap.
The turn is wrong. It must be 360 ÷ petals. With 12 petals that is 30.
My petals are spread across the Stage.
There is a go to x: (0) y: (0) inside the loop. Travel once, before the flower starts.
It takes ages to draw.
The wait is still inside the polygon block. Take it out.
Three flowers
One block, three very different flowers.
- Top left: 8 squares.
- Bottom middle: 10 pentagons.
- Top right: 16 triangles.
- Each flower starts in its own colour and fits on the Stage.
How to use this: Click the green flag. Three flowers are drawn one after another.
Teacher reveal
flower (8) (4) (35) :: custom
flower (10) (5) (28) :: custom
flower (16) (3) (52) :: custom
Each call needs its own travel first — centres at (-150, 55), (0, -45) and (150, 55).
A mandala
Layer three flowers on one centre to make a mandala — a round, repeating pattern.
- All three flowers share the same centre.
- The biggest is drawn first, the smallest last.
- Each layer is a different colour.
How to use this: Click the green flag. The big blue layer comes first, then pink, then yellow.
Teacher reveal
flower (8) (4) (68) :: custom
flower (12) (6) (30) :: custom
flower (6) (3) (26) :: custom
Each layer needs a go to x: (0) y: (10) and point in direction (90) before it. The flower block leaves the arrow facing the right way, but setting it again makes the layers line up even if a pupil’s numbers do not add up to 360.
A flower made of stars
Use last lesson’s star block as the petal.
- Eight five-point stars, all from the centre.
- The pattern closes up.
- The colour moves on between stars.
How to use this: Click the green flag and count the stars as they are drawn.
Teacher reveal
repeat (8)
star (5) (80) :: custom
turn cw (45) degrees
change pen (color v) by (12)
end
The star block from Lesson 6 has a wait in it. Pupils who leave it in get a slow but correct pattern — a good moment to ask why the flower block took it out of polygon.
Plant a garden
Click the Stage to plant a flower. Every flower is a surprise.
- The green flag clears the board and plants one flower.
- Every click plants a flower where you clicked.
- Each flower picks its own petals (5 to 12), sides (3 to 6), size and colour.
How to use this: Click the green flag, then click anywhere on the Stage to plant a flower.
Teacher reveal
when stage clicked
pen up
go to x: (mouse x) y: (mouse y)
point in direction (90)
pen down
set pen (color v) to (pick random (0) to (100))
flower (pick random (5) to (12)) (pick random (3) to (6)) (pick random (15) to (32)) :: custom
pen up
Summary 5 min
- Draw a shape, turn, draw it again — that is a pattern.
- The pattern closes when copies × turn = 360.
- A My Block can call another My Block.
- Scratch’s colour runs 0 to 100. Changing by 100 ÷ petals goes once round it.
- Rotational symmetry
- A pattern that looks the same after you turn it part of the way round.
- Petal
- One copy of the shape in a flower pattern.
- Mandala
- A round pattern built from layers that repeat around a centre.
Hand in
Save your garden. Next lesson the numbers move onto the keyboard, and your project becomes a pattern machine.