How do I move the turtle in LOGO?
Logo is all about moving the turtle... you give it commands like this:
Forward 100
Right 45
You can do stuff like repeating commands too:
Repeat 8 [Forward 100 Right 45] ; Draw an octagon
(What do I win? 8-)
// MOVE FORWARD
FD 75
// TURN RIGHT
RT 54
// TURN LEFT
LT 21
// MOVE BACKWARD
BK 17
Check out some other turtle commands found here...
Turtle Commands
BACK ## [BK]
- Move turtle backBACKGROUND ## [BG]
- Set Background color (0-15)- 0 - Black
- 1 - White
- 2 - Red
- 3 - Cyan
- 4 - Purple
- 5 - Green
- 6 - Blue
- 7 - Yellow
- 8 - Orange
- 9 - Brown
- 10 - Light Red
- 11 - Grey 1
- 12 - Grey 2
- 13 - Light Green
- 14 - Light Blue
- 15 - Grey 3
CLEARSCREEN [CS]
- Clear Screen without moving turtleDRAW
- Clear Screen and take turtle homeEACH
- Tell several sprites, whose numbers are in a list, to accept commands in a second list, e.g.EACH [1 2] [SQUARE 10]
FORWARD ## [FD]
- Move turtle forwardFULLSCREEN
- Full graphics screen (same as pressing F5)HEADING
- Output turtle heading as a number (0-359)HIDETURTLE [HT]
- Make turtle invisibleHOME
- Move turtle to center of screen pointing upLEFT [LT]
- Turn turtle leftNODRAW [ND]
- Enter text mode with clear screenNOWRAP
- Prevent drawings from wrapping around screenPENCOLOR [PC]
- Change pen colorPENDOWN [PD]
- Turtle leaves trailPENUP [PU]
- Turtle ceases to leave trailRIGHT ## [RT]
- Turn turtle rightSETHEADING [SETH]
- Set turtle heading, e.g.SETH 180
SETSHAPE
- Set the current sprite shape (0-7)SETX
Move the turtle to the specified x co-ordinates e.g.SETX 50
SETXY
Move the turtle to the specified x, y co-ordinates Eg.SETXY 50 50
SETY
Move the turtle to the specified y co-ordinate, e.g.SETY 50
SHAPE
- Output number of current sprite's shapeSHOWTURTLE [ST]
- Make turtle visibleSPLITSCREEN
- Mixed graphics and text screen (same as pressing F3)STAMPCHAR
- Make the turtle stamp a character at the current location, e.g.STAMPCHAR "A
TELL
- Tell designated sprite to receive commands, e.g.TELL 2
TEXTSCREEN
- Use whole screen for text (same as pressing F1)TOWARDS
- Output heading for turtle to face an X,Y coordinate, e.g.TOWARDS 0 0
WRAP
- Make turtle drawings wrap around the screenXCOR
- Output current x co-ordinate of turtleYCOR
- Output current y co-ordinate of turtleASPECT
- Set verticle screen scale factor, default is 0.76
Samples taken directly from website: http://gaza.freehosting.net/logo/index.html