# Draw 3D shapes (cube)

Challenge Level: Growing experience

Learning outcomes

Students will be able to:

## Requirement:

Write a program that draws a cube with each sides equal to 100 steps.

## 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
when green flag clicked
clear

set pen size to (3)

pen down

pen up
go to x: (0) y: (0)

point in direction (90 v)

move (100) steps

turn cw (90) degrees

move (100) steps

turn ccw ((180) - (45)) degrees

move (50) steps

turn ccw (45) degrees

point in direction (180 v)

move (100) steps

turn cw ((180) - (45)) degrees

move (50) steps

turn cw (45) degrees
repeat (4)
end

repeat (2)
end

repeat (2)
end
Recommended blocks for solution 2
when green flag clicked
clear

set pen size to (3)

pen down

pen up
go to x: (0) y: (-100)

point in direction (0 v)

move (100) steps

turn ccw (45) degrees

move (100) steps

turn ccw ((180) - (45)) degrees

move (100) steps

turn cw (45) degrees

move (100) steps

turn cw ((180) - (45)) degrees

move (100) steps

turn cw (45) degrees

move (100) steps

turn ccw (90) degrees

move (100) steps

turn ccw ((180) - (90)) degrees
repeat (2)
end

repeat (2)
end

repeat (2)
end
Hints
• A cube can be drawn by drawing a square and two 45 degree rhombuses adjacent to each other.

## Extra Challenge

Extra challenge #1: Write programs to draw other 3D shapes (for example cuboids, pyramids, cylinders, …)