Back to Turtle Family Logo Page

1 2 3 4 5

Logo Examples

These are examples of Logo procedures to try out. I have tried to
make them "generic" so they will work with whatever version of
Logo you have. For example, I haven't included a command to clear
the screen since that varies from one version to another ("cs" on
most versions, but "cg" in LogoWriter.) There is one exception,
however. Pendown (pd for short) must be replaced by penpaint if
using UCBLogo. See the radar procedure below.


These are all meant to be entered on the "edit" page (or "flip side" as
LogoWriter puts it.) Typing these procedures allows you to invent
new words. For example, after typing the square procedure you can
draw a square just by typing "square" in the command center.


This will draw a square:


To square
fd 50 rt 90
fd 50 rt 90
fd 50 rt 90
fd 50 rt 90
end


or this one will do the same thing:


To square
repeat 4 [fd 50 rt 90]
end


This draws a triangle:


to triangle
fd 50 rt 120
fd 50 rt 120
fd 50 rt 120
end


or use this shorter version:


to triangle
repeat 3 [fd 50 rt 120]
end

[CONVERTED BY MYRMIDON]