0% found this document useful (0 votes)
161 views2 pages

Move (Drawing) Commands: FOR FOR (I Start Stop Step) (Instruction List)

The document describes various drawing commands for turtles in Logo including: 1) Movement commands like FD, BK, LT, and RT to move the turtle forward, backward, left, and right by a given number of pixels or degrees. 2) Drawing commands like ARC to draw an arc with a given radius and angle and ST to show the current turtle. 3) Other commands like random to generate random numbers, orientation to return the turtle's orientation, and pos to return the turtle's position. 4) Procedural commands like to name to start a procedure with arguments and if/ifelse for conditional logic.

Uploaded by

Guto Condela
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
161 views2 pages

Move (Drawing) Commands: FOR FOR (I Start Stop Step) (Instruction List)

The document describes various drawing commands for turtles in Logo including: 1) Movement commands like FD, BK, LT, and RT to move the turtle forward, backward, left, and right by a given number of pixels or degrees. 2) Drawing commands like ARC to draw an arc with a given radius and angle and ST to show the current turtle. 3) Other commands like random to generate random numbers, orientation to return the turtle's orientation, and pos to return the turtle's position. 4) Procedural commands like to name to start a procedure with arguments and if/ifelse for conditional logic.

Uploaded by

Guto Condela
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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