The first time I ever used a turtle was back in school in the 80's.
Only back
then it wasn't called a "turtle" but a "BBC Buggy". We only touched
on the
basic's of controlling it, and I cannot remember today wether or
not it used
LOGO or some other language, afterall it was some time ago.
My Interest was re-awakened when I came into posession of several
Jessop
Ralph turtles. I had to get them going just for the fun of seeing
them in action.
Below is a step by step account of how I set one up and programmed
one the
other day just as an example for this page. I hope to go into more
detailed and
interesting turtle ventures at a later date. So for now, take a
look below.
Click on an image to enlarge
The "STAR" program explained.
LOGO is a "Mathematical" programming language. It uses basic commands
to make the "Turtle" move Forward and Back. To turn Left and Right,
an "angle"
is required to be entered. Basic shapes to complex artwork can be
achieved
when the language is mastered. So to our little program and its
meaning.
| FD 150
PD REPEAT 5 [FD 100 RT 144] PU LT 360 BK 150 |
So, Line by Line;
FD 150 ( Move Forward 150mm)
PD (Pen Down)
REPEAT 5 [FD 100 RT 144] (Repeat 5 times whats in
the square brackets, so Forward 100mm and Turn Right 144 degrees)
This will end up with us back at the start point of the Star.
PU (Pen Up)
LT 360 (This just turns the Turtle LEFT by 360 degrees just to
uncoil the cable, as we've been turning Right for the entire program)
BK 150 (The Turtle now moves backwards 150mm so it comes
to rest at the original start position on the edge of the paper.)
Thats just a starter for a LOGO program. I intend to go further
into programming and use of the turtle at a later date.
If you wish to have a go at LOGO yourself, a very comprehensive
"Free" version with Excellent Help and Example programs is available
to download from the net. Its called MSW LOGO.
|
|