Reflection

Challenge Level: Growing experience

Learning outcomes

Students will be able to:

Requirement:

Write a program that draws the reflection of the blue shape on the left about the y-axis line. Use two sprites drawing the blue and the red shapes simultaneously.

A shape reflected about the y-axis.

Testing examples:

There are no testing examples for this challenge.

Languages

Scratch

What it should look like

Click on the green flag to see the expected output of your program.

Recommended blocks for solution 1
whenclickedwhenclicked
clearclearsetpensizeto3setpencolortopendownpenupsetpensizeto3setpencolortopendownpenup
wait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secs
gotox:0y:100gotox:-100y:100gotox:-100y:0gotox:-100y:0gotox:-200y:0gotox:-200y:-100gotox:0y:-100gotox:0y:100gotox:0y:100gotox:100y:100gotox:100y:0gotox:100y:0gotox:200y:0gotox:200y:-100gotox:0y:-100gotox:0y:100
Recommended blocks for solution 2
whenclickedwhenclicked
wait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secswait1secs
clearsetpensizeto3setpencolortopendownpenupclearsetpensizeto3setpencolortopendownpenup
setangleto90setmirror angleto360-angle
gotox:0y:0pointindirection0move100stepsturnangledegreesmove100stepsturnangledegreesmove100stepsturnangledegreesmove100stepsturnangledegreesmove100stepsturnangledegreesmove200stepsturnangledegreesmove100stepsgotox:0y:0pointindirection0move100stepsturnmirrorangledegreesmove100stepsturnmirrorangledegreesmove100stepsturnmirrorangledegreesmove100stepsturnmirrorangledegreesmove100stepsturnmirrorangledegreesmove200stepsturnmirrorangledegreesmove100steps
Hints

Two different solutions to draw the shape and its reflection;

  • Solution 1: By drawing lines connecting the vertices (corners) using the “goto” block.

  • Solution 2: By moving steps and turning angles (each reflected angle is 180 - original angle).

Show Scratch solution