We can draw regular polygons.
We can draw a square four sides, equal length, right angles
with a repeat that looks quite a lot like that description.
rpt 4 [ fd 5 rt 90 ]
To change the shape, we must change the angle that is turned at the corners (or vertices). It is the outside angle we are turning.
For a triangle, this is 120 degrees.
rpt 3 [ fd 5 rt 120 ]
You should be able to work out how to draw any regular polygon.