Before we begin this month, I have heard from some that the programs thus far printed did not appear on the screen as intended. Since most of the QLs out there are running on TVs and not monitors, all the programs have been designed for a TV display. Before you enter this program, make sure that you are in TV mode. You can always redesign the program if you wish.
This months program is just a fun little demo of the turtle graphics. As anyone who has experimented with turtle graphics can attest, this isn’t a true example of the full capabilities of that turtle. But, it does serve to demonstrate the basic commands available on the QL.
Since, by now, you all know how to use DEFined PROCedures, I put all the turtle commands in a PROCedure called “doit”. All the print locations & ink colors are contained within the DATA statements.
In using turtle graphics as designed for the QL, it is nice to note that the commands POINT & TURNTO may be variables, calculated from within the program or assigned by a DATA & READ statement.
Back to old business – We’re still looking for additional input for this column. If you have discovered some amazing (or not) little trick, or have a question about a command, or a comment (civil), we would like to hear from you. Remember that this column is intended to be a resource for ALL QL users, and not just a place for me to present my views.
10 PAPER 0:CLS:CLS #0
20 FOR m=14 TO 18 STEP 2
30 RESTORE : PAUSE 60: CLS
40 FOR x=1 TO 5
50 READ a,b,c
60 doit
70 DATA 30,27,1,80,27,2,130,27,3
80 DATA 55,72,4,105,72,5
90 NEXT x
100 NEXT m
110 a=80:b=54:c=7:m=30: doit
120 FOR z=1 TO 7:c=z:doit:NEXT z
130 RECOL 0,2,0,2,0,0,0,6
140 PRINT #0\\,"That's all folks ";
150 PAUSE 240: RUN
160 DEFine PROCedure doit
170 POINT a,b
180 INK c
190 PENDOWN
200 TURNTO 0
210 FOR k=1 TO 28
220 MOVE m:TURN 90
230 MOVE m:TURN 90
240 MOVE m:TURN 90
250 MOVE m:TURNTO m*k
260 NEXT k
270 END DEFine
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.