Logo Documentation
Simple Commands
-
fd followed by a number:
turtle will move forward number of times;
Examples: fd 50, fd 87
-
bd means the same as fd but backwards;
Example: bd 10
-
rt followed by an angle:
turtle will turn right by the angle;
Examples: rt 45, rt 120
-
lt means the same as rt but the other way;
Example: lt 90
-
pu: turtle stops drawing and moves more secretly;
-
pd: turtle starts drawing the line after itself.
Styling Commands
-
clr followed by a color:
turtle changes line color to a new one;
Examples: clr cyan, clr #fff
-
bckgr followed by a color:
image will be filled with the new color.
Examples:bckgr purple, bckgr #022a42
Advances Commands
-
repeat followed by a number and [array of commands]:
turtle will repeat commands in the array number of times (can be nested);
Examples: repeat 3 [fd 100 rt 120], repeat 4 [rt 90 repeat 36 [fd 10 rt 10] ];
-
to followed by a name:
create a method, callable by the name.
Example:
to triangle repeat 3 [fd 100 rt 120] end
triangle
Other Commands
-
save: save an image drawn by the turtle (be careful with this one).
Even More Tips
-
Files with
.logocode extension can be drag&dropped into the editor area
(this will update the code in the editor).