Turtle Graphics

Date: 1991
Type: Diskette
Platform(s): QL
Tags: Graphics

A small, endless turtle-graphics pattern maker: from a fixed point the turtle moves and turns by random amounts in a random ink colour, beeping as it goes, building twisting star and spiral shapes; now and then the screen is cleared. Press any key to stop.

Hugh Howie gave it in his QLips column; it “came to me with a lot of other stuff”, and no author or source is named.

Published in Sinc-Link May-June 1991 (QLips).

Source Code

100 REMark Turtle graphics
110 WINDOW 512,256,0,0
120 PAPER 0:CLS
130 PENDOWN
140 REPeat logo
150   IF RND>.68 THEN CLS
160   note=RND
170 POINT 60,60
180   INK RND(1 TO 7)
190   turtle=RND(3 TO 70)
200   terrapin=RND(25 TO 340)
210    FOR k=1 TO turtle
220     MOVE k/.7
230     TURN terrapin
240     BEEP 3200,k/note
250   END FOR k
260 IF INKEY$<>"" THEN STOP
270 END REPeat logo

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.