What happens when a procedure calls itself?
This is the second in a twelve part introduction to Logo for beginners. In this part you learn to draw polygons.
Learn how to draw circles using Logo. Wait a minute! Are they really circles? If not what are they?
First Forward Into Logo This is the first in a twelve part series of articles introducing Logo programming for beginners. Even if you have never tried LOGO it is easy to learn and here is the place to get started! The programs in this article were written using MSWLogo and you can download this excellent free software from the internet at http://fmslogo.sourceforge.net/.
With only a limited set of instructions (i.e. primitives) it is usually quite straightforward to draw the most complex of shapes on the screen or to get the `turtle' to manoeuvre about the floor.
For example, using instructions such as:
forward 40 (FD 40) or backward 20 (BK 20), right 85 (RT 85 ) or left 125 (LT 125)
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:
e.g. FD 70 RT 90 FD 130 RT 90 FD 70 RT 90 FD 130 RT 90
For now, a reminder of some of the PRIMITIVES (the commands) needed to start drawing:
FD forward BK backward LT left RT right PU pen up PD pen down HT hide turtle ST show turtle CS clear screen CT clear text Now FD to the first challenge...
FD forward BK backward LT left RT right PU pen up PD pen down HT hide turtle ST show turtle CS clear screen CT clear text
Can you use LOGO to draw the 5-square?
Next: FF2