![]() |
![]()
Custom Search
|
Computer History
|
|||||||||||
|
A modern derivative of Logo is a variation that allows thousands of "turtles", each moving independently. There are two popular implementations: MIT StarLogo and NetLogo. These derivatives allow for the exploration of emergent phenomena and come with many experiments in social studies, biology, physics, and many other sciences. Although the focus is on the interactions of a large number of independent agents, these variations still capture the original flavor of Logo. There is no single agreed-upon Logo language definition or standard, only a loose tradition. As a result, there are substantial differences between the many dialects of Logo that have evolved. The code examples shown below would work in many Logo dialects, but not all. Logo programmingThe 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. From these building blocks you can build more complex shapes like squares, triangles, circles--using these to draw houses or sail boats. The turtle moves with commands that are relative to its own position, "LEFT 90" meant rotate left by 90 degrees. A student could understand (and predict and reason about) the turtle's motion by imagining what they would do if they were the turtle. Papert called this "body syntonic" reasoning. The idea of turtle graphics is also useful for example in Lindenmayer system for generating fractals. Turtle programmingThe following is an example of Turtle code. While seemingly very simple, turtles can be given groups of instructions, essentially creating libraries of more complex commands. In practice short forms are used. For example, "LEFT 90" is written "LT 90". Key words are usually written in upper case for beginners, but more advanced texts use lower case. FORWARD 100 The languageLogo is an interpreted language. It is not case dependent, but retains the case used for formatting. It is written in lines. It is a compromise between a sequential programming language with block structures, and a functional programming language. There is no 'standard' LOGO, but UCBLogo is highly regarded. It is a teaching language but its list handling facilities make it remarkably useful for producing useful scripts. ResourcesHistory of Programming Languages Source: http://en.wikipedia.org/wiki/Logo_programming_language |