LOGO Commands 1

Use the commands below to start drawing pictures on the computer with your LOGO turtle. The command descriptions were adapted from the Berkeley Logo User Manual, Copyright 1993 by the Regents of the University of California.



GRAPHICS
========

The center of the graphics window is turtle location [0 0].  Positive
X is to the right; positive Y is up.  Headings (angles) are measured
in degrees clockwise from the positive Y axis.  (This differs from the
common mathematical convention of measuring angles counterclockwise
from the positive X axis.)  The turtle is represented as an isoceles
triangle; the actual turtle position is at the midpoint of the base
(the short side).


TURTLE MOTION
-------------

FORWARD dist
FD dist

	moves the turtle forward, in the direction that it's facing, by
	the specified distance (measured in turtle steps).

BACK dist
BK dist

	moves the turtle backward, i.e., exactly opposite to the
	direction that it's facing, by the specified distance.  (The
	heading of the turtle does not change.)

LEFT degrees
LT degrees

	turns the turtle counterclockwise by the specified angle,
	measured in degrees (1/360 of a circle).

RIGHT degrees
RT degrees

	turns the turtle clockwise by the specified angle, measured in
	degrees (1/360 of a circle).

CLEARSCREEN
CS

	erases the graphics window and sends the turtle to its initial
	position and heading.

HOME

	moves the turtle to the center of the screen.


PEN CONTROL
-----------

The turtle carries a pen that can draw pictures.  At any time the pen
can be UP (in which case moving the turtle does not change what's on
the graphics screen) or DOWN (in which case the turtle leaves a
trace).


PENDOWN
PD

	sets the pen's position to DOWN, without changing its mode.

PENUP
PU

	sets the pen's position to UP, without changing its mode.


CONTROL STRUCTURES
==================

Note: in the following descriptions, an "instructionlist" can be a list
or a word.  In the latter case, the word is parsed into list form before
it is run.  Thus, RUN READWORD or RUN READLIST will work.  The former is
slightly preferable because it allows for a continued line (with ~) that
includes a comment (with ;) on the first line.

REPEAT num instructionlist

	command.  Runs the "instructionlist" repeatedly, "num" times.

BYE

	command.  Exits from Logo; returns to the operating system.


Mtht420