Drawing Patterns with Repeat ...

You can contruct all sorts of geometric patterns using the repeat command. In the example below a the procedure SQUARE is first defined and then a procedure called PATTERN1 is used to draw a series of squares to make the pattern. In this example, the turtle is rotated 60 degrees after each square. Try reducing the angle and observe the differences in the final pattern.

NOTE: For best effect use an angle that divides evenly into 360 degrees.

to SQUARE
repeat 4 [FD 100 RT 90]
end

to PATTERN1
repeat 6 [SQUARE RT 60]
end

<- Back -Menu- Next ->