Triangles

Draw squares and triangles. Draw them in exactly the right position.

Our Simple Square

We can draw a square four sides, equal length, right angles with a repeat that looks quite a lot like that description.

  / - repeat for four sides
  |       / - go forward the same distance
  |       |    / - turn a right angle (90 degrees)
  |       |    |
rpt 4 [ fd 5 rt 90 ]

A Triangle

To change the shape, we must change the angle that is turned at the vertices. It is the outside angle we are turning.

Diagram showing outside angle turned to draw a triangle

For a triangle, this is 120 degrees.

rpt 3 [ fd 5 rt 120 ]

Over To You

Can you draw these triangles?

3 triangles in different colours and orientations

You could start by drawing them one at a time.

Next, try to draw them all on the same screen with a program that works when you press reset.