Logo is a programming language with procedures, lists and interactive evaluation, often used to make algorithmic ideas visible through turtle graphics. The turtle has a position and heading; motion commands can draw a line while changing that state. For example,
repeat 4 [forward 100 right 90] draws a square and returns to the initial heading. Each turn is an exterior angle, so a regular -gon uses turns of degrees.[ref]Berkeley Logo 6.2 User Manual by Brian Harvey. Graphics and Control Structures, FORWARD, RIGHT and REPEAT
A named procedure can package this instruction pattern and accept a side length as a parameter. Repeated calls and recursive procedures then produce more elaborate drawings without storing every line explicitly. The language also manipulates words and lists; turtle drawing is a useful experimental interface for studying programs, rather than the entire language.
Turtle graphics draws through commands interpreted relative to a moving cursor's position and heading. A forward command moves along the current heading, a turn changes it, and pen state determines whether motion leaves a mark. The picture is the trace of a sequence of state changes, making geometric reasoning executable.[ref]
Berkeley Logo 6.2 User Manual by Brian Harvey. Graphics, FORWARD, RIGHT, PENUP and PENDOWN
In Logo,
repeat 4 [forward 100 right 90] draws a square and returns to the original heading and position. For a regular -sided polygon, each exterior turn is degrees, so the total turning is one full revolution. The same procedure works from a different initial position or heading, illustrating how local commands avoid specifying every absolute coordinate. Articles by others on the same topic
Logo is a programming language that was designed in the 1960s primarily for educational purposes and is known for its use in teaching concepts of programming and mathematics to children. One of the most distinctive features of Logo is its turtle graphics system, which allows users to control a "turtle" that moves around the screen, drawing shapes and patterns as it goes. The language is based on the concept of simple commands that can be combined to create more complex programs.