Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

chromatic
  (email not shown publicly)
http://wgz.org/chromatic/

Blog Information [technorati.com] Profile for chr0matic [technorati.com]

Journal of chromatic (983)

Monday May 25, 2009
06:15 PM

Nostalgia is Turtles All the Way Down

[ #39032 ]

I spent the day working with my friend Dave Woldrich (of CardMeeting infamy). He brought out a couple of old COMPUTE!'s Gazette issues and we reminisced about how we learned to program.

Here's a fun Turtle BASIC-ish program we put together in a couple of minutes. The syntax isn't quite authentic, but writing a little language for this would be easy.

10 CLEAR
20 SET counter, turns
30 SHOW turtle
40 MOVETO turtle, 160, 10
50 PENDOWN turtle
60 FACE turtle, 90
70 IF counter LT 0 GOTO 130
80 PENCOLOR turtle, RANDOM * 255
90 WALK turtle, steps
100 TURN turtle, degrees
110 SET counter, counter - 1
120 GOTO 70
130 PENUP turtle

To draw a circle, set turns to 360 and degrees to 1. To draw a square, set degrees to 90 and turns to 4. steps is the number of pixels in length of a side of the polygon.

As silly as this is (and over 25 years since writing a program like this), the nostalgia factor is immense.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.