Anda di halaman 1dari 4

Steve Zoerb C+I 336 Logo Where to get MSWlogo: http://www.softronix.com/logo.

html The Turtle:

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. Its 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 FORWARD n BACK n RIGHT n LEFT n HOME CLEARSCREEN HIDETURTLE SHOWTURTLE REPEAT n[commands] PENUP Abbreviation FD BK RT LT none CS HT ST none PU Result moves the turtle forward n units moves the turtle back n units turns the turtle n degrees to the right turns the turtle n degrees to the left Returns the turtle to its origin Erases the screen Hide the turtle Show the turtle Repeats the commands n times Lifts the pen as the turtle moves. The turtle stops drawing.

PENDOWN BYE EDIT "<procedure> EDALL SAVE "<fileName> LOAD "<fileName> PENERASE PENPAINT

PD none none none none none PE PPT

SETPENCOLOR [Red, Green, Blue] LABEL Hello -or- [Hello] FILL SETPOS [n n] POS SETHEADING n TOWARDS [n n] TO procedure EDIT procedure :variable_name repcount PERSPECTIVE LEFTROLL n RIGHTROLL n UPPITCH n DOWNPITCH n

setPC none none none none SETH n none none none none none none none none none none

The turtle continues to draw as it moves. Closes MSW Logo and exits the program. Opens the Editor window and either loads an existing <procedure>, or starts a new procedure. Opens the Editor window and loads ALL procedures in the current session. Saves the current session to disk using the name entered as :<fileName> Loads a previously saved file from disk. Sets the pen's position to DOWN and the mode to erase. Sets the pen's position to DOWN and the mode to PAINT. (PAINT is the normal mode.) Changes the pencolor. eg SETPENCOLOR [255, 0, 0] = Red, SETPENCOLOR [0, 255,0] = Green, SETPENCOLOR [0, 0, 255] = Blue Writes Hello at the turtle position floods the area where the turtle is with the flood color moves the turtle to the x, y coordinates given outputs the x and y position of the turtle sets the turtle's heading in degrees outputs the heading the turtle would have if facing x, y given defines the name of a procedure to teach logo commands takes you to the editor to edit a procedure eg. TO square :size sets a variable :size that can be used in square the number of times that a procedure has been repeated Switch to 3D mode Rolls the turtle (on to his left side) by n degrees Rolls the turtle (on to his right side) by n degrees Pitches the turtle nose up by n degrees 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: http://www.sebas.vic.edu.au/staff/oparnaby/mswlogo/quiz.htm Add pictures as backgrounds Make a racetrack: http://www.sebas.vic.edu.au/staff/oparnaby/mswlogo/Drivingturtle.htm Allow for Network communications: http://www.sebas.vic.edu.au/staff/oparnaby/mswlogo/networking.htm 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

Anda mungkin juga menyukai