Translation

Challenge Level: Ready to expand

Learning outcomes

Students will be able to:

Requirement:

Write a program that draws a cube with each sides equal to 50 steps. Translate the cube 6 times across to draw the image shown below.

A cube repeated 6 times across.

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
whenclicked
setsidesto50
clearpendownpenupsetpensizeto3
gotox:-180y:-50pointindirection0pointindirection90pointindirection180movesidesstepsmovesidesstepsmovesidesstepsmovesidesstepsmovesidesstepsmovesidesstepsmovesidesstepsmovesidesstepsmovesqrtofsides*sides+sides*sidesstepsturn45degreesturn45degreesturn180-45degreesturn45degreesturn90degreesturn180-45degreesturn180-90degrees
repeat2repeat6
Hints
  • To translate a shape, every point of the shape must move the same distance in the same direction.
  • To draw the above image, translate the cube by the distance of the square’s diagonal, which is approximately 1.412 times the length of a side i.e. 70.71 if the side was 50 steps. (This is calculated using Pythagoras' theorem: d=side2+side2=side2)
    A diagonal cube.

Show Scratch solution