- #Msw logo commands with examples code#
- #Msw logo commands with examples plus#
- #Msw logo commands with examples windows#
In this case, any time CHAIR is entered, " REPEAT 4 FD 200" will be executed. The new word is saved into the available vocabulary, but the definition will be lost once the Logo interpreter is stopped. Once one is finished with the editor, one must exit from it. The commands TO CHAIR and END must be entered on separate lines. This can be done from the Logo prompt or an Editor, which is invoked by EDALL in many Logo dialects.
Which would execute the command " FD 100 RIGHT 90" four times.Ī simplistic circle consists of 360 individual rotations with a step forward, so " REPEAT 360 " would have the expected result. This would draw the exact same box as in the first example: You could also use loop (repeat) commands. PENDOWN (now we've lowered the pen so it draws a line wherever the turtle moves) PENUP (now we've lifted the pen so it won't draw anything even if we do move) (A typical command can then be read "FD space 10", specifying everything clearly and saving frustration.) Anything written after the (semicolon) is ignored, allowing the coder to insert comments. In this example we'll use the short form for FORWARD, which is FD. The turtle's pen could be lifted and lowered drawing a dotted line was rudimentary. The commands may be written on one line, or more. This would draw a square with sides 100 units long (but the turtle still has to turn LT 90 to be in the starting position).
Key words are usually written in upper case for beginners, but more advanced texts use lower case. For example, "LEFT 90" is written "LT 90". While seemingly very simple, turtles can be given groups of instructions, essentially creating libraries of more complex commands. The following are examples of Turtle code. The idea of turtle graphics is also useful for example in Lindenmayer system for generating fractals. Papert called this "body syntonic" reasoning. A student could understand (and predict and reason about) the turtle's motion by imagining what they would do if they were the turtle. The turtle moves with commands that are relative to its own position, "LEFT 90" meant rotate left by 90 degrees. From these building blocks you can build more complex shapes like squares, triangles, circles-using these to draw houses or sail boats. The idea is that a turtle with a pen strapped to it can be instructed to do simple things like move forward 100 spaces or turn around.
#Msw logo commands with examples code#
The code examples shown below would work in many Logo dialects, but not all. As a result, there are substantial differences between the many dialects of Logo that have evolved. There is no single agreed-upon Logo language definition or standard, only a loose tradition. Although the focus is on the interactions of a large number of independent agents, these variations still capture the original flavor of Logo. These derivatives allow for the exploration of emergent phenomena and come with many experiments in social studies, biology, physics, and many other sciences. There are two popular implementations: MIT StarLogo and NetLogo. and is worth considering.Ī modern derivative of Logo is a variation that allows thousands of "turtles", each moving independently. Comenius Logo is available in Dutch, German, Czech etc.
#Msw logo commands with examples windows#
MSWLogo, its freeware Windows derivative, is commonly used in schools in the United Kingdom. A popular cross-platform implementation is UCBLogo. There are over 130 implementations of Logo, each of which has its own strengths. The earliest school users were at Muzzy Jr High, Lexington MA.
Irving had touch sensors and could do forward, back, right, left (rotations), and ding (Irving had a bell). The first turtle was a radio controlled (wireless) floor roamer named "Irving". Logo is not too much different now from the basic concepts before the first turtle.
#Msw logo commands with examples plus#
However, ease of use for non-typists who had to use a Teletype, was a big consideration, plus informative error comments. Power was NOT a significant factor in the design. Lots of other effects have been proposed as causes. The goal was basic problem solving the turtle gave immediate (non-written) feedback so bugs could be spotted - and it was fun. The first implementation was written in LISP on a PDP-1. The first four years of Logo research, development and teaching work was done at BBN. Its intellectual roots are in artificial intelligence, mathematical logic and developmental psychology. Logo was created in 1966 at BBN, a Cambridge research firm, by Wally Feurzeig and Seymour Papert.