This document contains MicroWorlds code to draw various shapes including a square, rectangle, triangles, pentagon, trapezium, octagon, and a custom pattern. For each shape, it provides the code and a brief explanation of how that code draws the shape. For example, it explains that the square code uses FD 90 and RT 90 repeated four times to draw the four sides of a square, and the rectangle code is similar but uses FD 180 for the longer sides.
3. SQUARE
FD 90 RT 90 FD 90 RT 90 FD 90 RT
90 FD 90 RT 90
So FD 90 means forward 90 mini
turtle steps so then it moves
forward and then RT 90 means
right turn 90 so then if I repeat
that 4 times because that is how
many sides there are on a square
than that would make a square.
4. RECTANGLE
FD 90 RT 90 FD 180 RT 90 FD 90 RT
90 FD 180
The rectangle is the same as the square
but the top and bottom is stretched out.
So instead of having FD 90 it is FD 180
because that is double 90 for the second
and fourth FD.
5. TRIANGLES
rt 45 fd 50 rt 90
fd 50 rt 90 fd 75
fd 35 rt 90 fd 100 rt
160 fd 105
A scalene triangle
An equilateral triangle
The RT 45 is to get it
in the right angle so
then the FD 50 is
making one of the sides
then it has to RT 90 and
FD 50 to make another side.
Then do it again for the third side.
The FD 35 is to do the first side
which is the smallest side and
then RT 90 to make it turn
horizontal. Then FD 100 to go
forward. Then we need a big
turn to make it diagonal then
FD 105 to finish the last side
with a n extra 5 because it is
going diagonal.
6. PENTAGON
repeat 5 [fd 50 rt 72]
You need the repeat 5 because a pentagon has five sides.
Then FD 50 to make it go forward and RT 72 because that
is the right angle.
7. TRAPEZIUM
rt 15 fd 100 rt 70 fd 100 rt 70 fd 100 rt
110 fd 155
The RT 15 is to make it
start on the right angle.
Then the FD 100 to make
it go forward. Then RT 70
because it is so close to 90
And 90 is a quarter to a
hole lap. Then FD 100 and
RT 70 the same as before
and then another FD 100
but then a RT 110 because
it needs to be a shaper turn
then FD 155 because that
is the longest side
8. OCTAGON
repeat 8 [rt 45 fd 50]
Repeat 8 because that is how
many sides an octagon has.
Then RT 45 because it is half
of 90 and 90 is a quarter of
a full turn. Then FD 50 to just
move forward so that it can
make a shape.
9. MY PATTERN
repeat 9999 [fd 9999 fd 9999 fd 9999 fd
9999]
The repeat 9999 is so that it
can make it go round enough
times. Then lots of FD 100 for
when I set it up in the corner it
would just keep winding around.