You are on page 1of 2

Move (drawing) commands

FD x Move forward x pixels Make "name x Assigns the value x to the string name.
Example: FD 100
BK x Move Backward x pixels Random n Returns an integer random number that
Example: BK 100 ranges from 0 to just less than n
LT x Rotate the turtle x degrees left FOR FOR [i start stop step] [Instruction List]
Example: LT 45
RT x Rotate the turtle x degrees right. do.while, If,Ifelse
Example: RT 45
ARC a r Draw an arc with an included angle ARC2 a r Draw an arc with an included angle
of a degrees and radius of r. However, the of a degrees and radius of r. However,
turtle remains at the center of the arc. the turtle ends up at the end of the arc.
Example: ARC 45 100 Example: ARC 45 100
ST Shows the current turtle. Show Shows in the commander whatever you
Example: ST ask
HT Hides the current turtle. Wait n Pauses for the specified amount of
time, measured in 1/60 seconds, before
Example: HT
executing the next command
Orientation Returns a three member list with the Pos Returns a two member list with the x
orientation of the turtle. In two dimensions, and y position of the turtle. You can
we are only concerned with the last element either assign the list to a variable, or get
in the list. You can either assign the list to a a value from the list.
variable, or get a value from the list. Example: POS;
Example: Orientation; Make "xstartposition FIRST
Make "startangle LAST POS (Assigns the value of the
Orientation (Assigns the value of the turtle's x position to the variable
turtle's x position to the xstartposition)
variable startangle)
CS An abbreviation for clear screen End Marks the end of a procedure and is
required
To name arg1 .... Starts a procedure, called name, that takes ifelse < . > < . > [ . ] seno ento
optional arguments arg1 arg2 .....
Sqrt raiz quadrada first < . > primeiro da lista
remainder < . > < . > O Resto emptyp < . > Vazio
Lput < . > < . > com o ltimo PU "pen up
Fput < . > < . > com o primeiro PD pen down
Butlast [ . ] sem o ltimo SetPenSize [n n]
Butfirst [ . ] sem o primeiro SetPC [r g b]
setfloodcolor [r g b] Penerase
Fill Pennormal

You might also like