Microworlds Logo Help Guide

(www.microworlds.com)

Commands

FORWARD number
FD number
Commands the active turtle to move forward a specific number of steps BACK number
BK number
Commands the active turtle to move backwards a specific number of turtle steps
RIGHT number
RT number
Commands the active turtle to turn right a specific number of degrees LEFT number
LT number
Commands the active turtle to turn right a specific number of degrees
CG Clears the graphics on the current page and returns the active turtle to the center (HOME) of the page with its heading set to 0 STOPALL Makes all the turtles stop whatever they're doing.
(This is handy!)
HOME Instructs the active turtle to move to the center of the page, coordinates [0 0] SHOW item Prints out item in the command center.(This is also handy!)
i.e. SHOW COLOR
SETH number Commands the active turtle to set its heading to a specific compass heading (0-360) SETSH number
SETSH "shapename
Tells the active turtle to wear a specific costume (shape)
i.e. SETSH "Bird1
SETC number
SETC "colorname
Tells the active turtle to change its pen color to the specified color by specifying the number of a color or its name ie... SETC "RED SETBG number
SETBG "colorname
Tells the page to change its background color to the specified color by specifying the number of a color or its name
i.e. SETBG "RED
PD Instructs the active turtle to put its pen down so that it may draw while moving PU Instructs the active turtle to lift its pen up so that it does not draw while moving
SETX number Tells the active turtle to slide (left/right) along the X-axis to a
specified point
SETY number Tells the active turtle to slide (up/down) along the Y-axis to a specified point
TALKTO "object
TTO"object
Makes the specified turtle or text box current. This command has the same effect as typing the name of a turtle or text box followed by a comma.
i.e. TTO "T2
TOWARDS"turtlename Sets the heading of the current turtle to aim towards the one whose
name is given as input.
i.e. TOWARDS "T3
ASK [list of turtles ] [list of instructions ] Asks a list of turtles to run a specific list of instructions REPEAT number [list of instructions ] Asks the turtle to repeat the list of instruction several times.

Reporters

HEADING Reports the current heading of the active turtle POS Reports the current position of the active turtle as a list of two points
XCOR Reports the active turtle's position on the X-axis YCOR Reports the active turtle's position on the Y-axis
DISTANCE "turtlename Reports the distance, in turtle steps, from the active turtle to another specified turtle WHO Reports the name or number of the active turtle
SHAPE Reports the name or number of the costume the active turtle is currently wearing COLORUNDER Reports the name or number of the color underneath the active turtle
COLOR Reports the name or number of the active turtle's pen color BG Reports the name or number of the background color of the current page

Hatching a New Turtle

1) Click on the turtle tool in the tool palette
2) Put the cursor on the page where you want the turtle to appear
3) Click the mouse.

Remember that in MicroWorlds the turtle's pen is up unless you change it to PE or PD.

Putting a Costume (New Shape) on a Turtle

1) Open the shapes center by clicking on the dog in the command center
2) Click once on the shape you wish to have the turtle wear. Remember that you may scroll through the shapes.
3) Click the hand cursor on the turtle you wish to dress

You may also do this under program control by talking to a turtle or turtles (last one clicked on, created, or addressed via Talkto, Ask, or typing it's name followed by a comma.

1) Type SETSH the.shape.number or the.shape.name

SETSH 23
SETSH "Bird1

You may give SETSH a list of shapes to automatically flip between. For example:

SETSH [bird1 bird2]

will cause the current turtle to automatically change shapes over and over again in the order they appear in the list.

Resizing a Turtle

1) Click on the + magnifying glass or - magnifying glass depending if you wish to enlarge or reduce a shape
2) Click the magnifying glass on the turtle you wish to resize until you get the desired size
or use the SETSIZE # command to adjust the size of the current turtle

Stamping a Turtle's Shape

1) Put the desired size shape on a turtle and either:
a) Type Stamp
b) Click on the rubber stamp icon in the tool palette
Click the rubber stamp on the turtle
Repeat the process by dragging the turtle and clicking on it again

Giving a Turtle a Script or Editing an Existing One

1) Choose the turtle tool from the tool palette
2) Click on the turtle
3) Type the commands you wish the turtle to follow when clicked on into the instruction line
4) Decide whether you want the script to be run once or forever by clicking on one of the two buttons, Once or Many Times

If a turtle is running a script many times, you may stop it by clicking on it.

Programming a Color

MicroWorlds allows you to program a color to do something when a turtle is over it or the mouse is clicked on it.

1) Open the drawing center by clicking on the paintbrush in the tool palette
2) Choose the color you wish to program by double-clicking on it. All shades of that color will carry the same instructions.
3) Enter the instructions for the turtle and/or mouse click and press OK

Let's paint a picture with the turtle!

Turtle animation

Cooler turtle animation (flipbook animation)

Follow the same steps as above, but add a command such as, SETSH [bird1 bird2] FD 5, in the Instruction: line of the turtle.


All the text is gathered from Gary Stager's Logo pages at http://gsep.pepperdine.edu/~gstager/home.html.

Date Modified: 12/10/08

Andrew Begel     abegel@cs.berkeley.edu