Documente Academic
Documente Profesional
Documente Cultură
Introduction to Algorithms
4. Turtle Graphics
R K Shyamasundar
In the previous articles of this series, we have looked at the basic A good
control structures of languages. In this article, we shall take a look programming
at an integration of such structures witfi simple graphic language should
commands and illustrate how such an integration aids the help express how
programmer to solve problems in turtle-geometry. Finally, we the program
provide a glimpse of a few of the programming languages that should run, and
support different styles of programming. what it intends to
accomplish.
A Simple Programming Language
Capabilities of Turtle
line n Move n units and draw a straight line in the direction of the Turtle
skip n Move n units in the direction of the Turtle without drawing a line
anti-clock n Rotate the Turtle by n degrees in the anti-clockwise direction
clockwise n Rotate the Turtle by n degrees in the clockwise direction
RESONANCE J Seplember1996 15