Repeating Patterns

If you type:
BOX 40 40 CIRCLE 40 JT 40 0, you will see the following picture:

Notice that the triangle (called the turtle) is ready to draw the next picture besides the original one. So if you type now in the command line:

REPEAT 3 IT, you will three copies side by side:

and the text in the editor will become:
REPEAT 3 [
BOX 40 40 CIRCLE 40 JT 40 0
]

Part I: Load Repeat Practice

The first picture Shows 8 lines next to each other.:

To create the picture you can draw one line and place the triangle at the start of the second line and type REPEAT 8 IT. You could also type directly in the editor something like
REPEAT 8 [FD 30 GOMV15 -30] or
REPEAT 8 [FD 30 JT 15 0]

The second and the third pictures can be done using the same idea as the first one
:

However, the forth picture is based on a different idea:

Here the turtle moves a very small step forward (FD 1) and turns a very small amount to the right (RT 1) and since it is half a circle, it must repeat IT 180 times.

The fifth exercise does introduce a related idea. Since there are 360 degrees in each turn and since 72 * 5 = 360 we get a pentagon using the command REPEAT 5 [FD 50 RT 72]

The star below is actually also five sided like the pentagon. In both figures all the sides and turns are equal to each other. The only difference is that the total number of degrees that the turtle turns in the case of the star is 2*360=720 and thus each turn is 720/5=144.
REPEAT 5 [FD 50 RT 144]


Part II: Load Exercises


Paper self test: