"TURTLES"
: a simple pattern-generating program
LOGO is an interactive computer
language designed in 1967 as a learning program for children. LOGO controlled the motions of a
mechanical "turtle" so as to draw a path
with a pen on a sheet of paper by means of simple 'run' and 'turn'
instructions. Subsequent versions drew designs on a monitor.
1
START (0,0)
2
GO 10
3
TURN 90
4
IF (0,0) THEN GO TO 6
5
ELSE
GO TO 2
6
STOP
Four results:
(a) as written, program
generates a convex polygon (square)
(b) if [2 GO 20]
: a larger
square
(c) if [3 TURN 120]
: a triangle
(d) if [3 TURN 144]
: a five-pointed
star
