LOGO is often used to control a `floor turtle' or to instruct a `screen turtle' to draw on a computer screen.
Using only a limited set of instructions (i.e. primitives) it is quite straightforward to draw the most complex of shapes on the screen or to get the `turtle' to manoeuvre about the floor.
e.g. Using instructions such as:
| or | FORWARD 40 | (abbreviated to) FD 40 | |
| BACK 20 | BK 20 | ||
| RIGHT 85 | RT 85 | ||
| or | LEFT 125 | LT 125 |
You can construct drawings or give commands to a floor turtle.
The difficulty always seems to be about remembering to put spaces between the commands - FD, BK, RT, or LT and the amount of distance or turning you want the screen or floor turtle to achieve. Can you visualise what the following set of instructions will do before trying them out?
|
|
And, there is always the convention of returning the screen or floor turtle to exactly the same place that it had started from.
N.B. The commands are usually written in CAPITALS.
Why not use these commands to try to draw something of your own:
Why not formulate your own ideas and try them out on a computer. You will know how well you are doing by how quickly you manage to create what you had in your mind's eye. When you are ready you might like to move on to Challenges 1 and 2. Can you copy the drawings exactly? These challenges will also introduce you to some new commands and ideas.
Some of the PRIMITIVES (the commands) needed to start drawing:
| FD forward | BK back | ||
| LT left | RT right |
With several others that might strike you as obvious:
| PU pen up | PD pen down |
Useful when wanting to move without leaving a trail!
| HT hide turtle | ST show turtle |
Useful when wanting to start afresh!
| CS clear screen | CT clear text |
A list of all the commands you might need in this series of challenges is given in the section "Primitives".