Logo Commands:



Steve Zoerb

C+I 336

Logo

Where to get MSWlogo:



The Turtle:

[pic]

Why a "Turtle"? - The original idea behind Logo was that a small robot device would be connected to the computer and made to move around the floor, drawing as it goes. The first such robot was a domed perspex device with wheels. It’s domed "shell' made it look like an electronic turtle. The robot 'turtle' has evolved into a graphical turtle on the screen. In some logos a representation of a turtle remains as the 'pointer'. In MSW Logo it has been reduced to a triangular pointer.

Logo Commands:

|Command |Abbreviation |Result |

|FORWARD n |FD | moves the turtle forward n units |

|BACK n |BK | moves the turtle back n units |

|RIGHT n |RT | turns the turtle n degrees to the right |

|LEFT n |LT | turns the turtle n degrees to the left |

|HOME |none | Returns the turtle to its origin |

|CLEARSCREEN |CS | Erases the screen |

|HIDETURTLE |HT |Hide the turtle |

|SHOWTURTLE |ST |Show the turtle |

|REPEAT n[commands] |none |Repeats the commands n times |

|PENUP |PU |Lifts the pen as the turtle moves. The turtle stops drawing. |

|PENDOWN |PD |The turtle continues to draw as it moves. |

|BYE |none |Closes MSW Logo and exits the program. |

|EDIT " |none |Opens the Editor window and either loads an existing |

| | |, or starts a new procedure. |

|EDALL |none |Opens the Editor window and loads ALL procedures in the current|

| | |session. |

|SAVE " |none |Saves the current session to disk using the name entered as |

| | |: |

|LOAD " |none |Loads a previously saved file from disk. |

|PENERASE |PE |Sets the pen's position to DOWN and the mode to erase. |

|PENPAINT |PPT |Sets the pen's position to DOWN and the mode to PAINT. (PAINT |

| | |is the normal mode.) |

|SETPENCOLOR [Red, Green, Blue] |setPC |Changes the pencolor. eg SETPENCOLOR [255, 0, 0] = Red, |

| | |SETPENCOLOR [0, 255,0] = Green, SETPENCOLOR [0, 0, 255] = Blue |

|LABEL “Hello -or- [Hello] |none |Writes “Hello” at the turtle position |

|FILL |none |floods the area where the turtle is with the flood color |

|SETPOS [n n] |none |moves the turtle to the x, y coordinates given |

|POS |none |outputs the x and y position of the turtle |

|SETHEADING n |SETH n |sets the turtle's heading in degrees |

|TOWARDS [n n] |none |outputs the heading the turtle would have if facing x, y given |

|TO procedure |none |defines the name of a procedure to teach logo commands |

|EDIT procedure |none |takes you to the editor to edit a procedure |

|:variable_name |none |eg. TO square :size sets a variable :size that can be used in |

| | |square |

|repcount |none |the number of times that a procedure has been repeated |

|PERSPECTIVE |none |Switch to 3D mode |

|LEFTROLL n |none |Rolls the turtle (on to his left side) by n degrees |

|RIGHTROLL n |none |Rolls the turtle (on to his right side) by n degrees |

|UPPITCH n |none |Pitches the turtle nose up by n degrees |

|DOWNPITCH n |none |Pitches the turtle nose up by n degrees |

*Many more commands can be found under “help” in the logo interface.

Things you can do with logo:

Move multiple turtles at once

Produce fonts

Color objects

Cut and paste

Give status reports

Make sounds

Work in 3D and view in 3D

Create solids

Add pop-up windows

Make a quiz:



Add pictures as backgrounds

Make a racetrack:



Allow for Network communications:



Activity:

First, view the Demo under “help” in the logo interface. Then go through the procedures below. Examples can be found in:

C:\Program Files\Softronics\Microsoft Windows Logo\Examples

In one file, create and save procedures that will make each of the following:

1. a square

2. a circle

3. a square with the side length as input

4. any polygon, with the side length and number of sides as inputs

5. a star filled with a color

6. some creative 2D shape

7. a pattern that repeats itself

8. a basic sphere

9. some creative 3D shape

Challenge (not required):

If you have extra time, try to create procedures that will make each of the following:

10. a spiral

11. a heart

12. a sine wave

13. a car

14. a design made by multiple turtles

15. a sphere with a colored outer shell

16. a creative 3D pattern that repeats itself

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download