More One-Liners for the 2068

See all articles from T-S Horizons n10
Publication: T-S Horizons
Pub Details: T-S Horizons n10 (Issue 10)
Date: Dec 1984
Pages: 29

The “2068 Spirograph” routine drew a good bit of response including a letter from Robert Hartung, former writer for SYNC magazine. He informs us that the routine is a variation of one which is at the top of page 472 of Morse, Adamson, Anrep, and Hancock’s Essential Guide To T/S Home Computers. Another variation is this one Robert made up for SYNC the month Ziff Davis pulled the plug.

   1 LET p=INT (RND*8): LET i=INT (RND*8): IF p=i THEN RUN
2 CLS : PLOT 65,27: ON ERR GO TO 2: INK 1: PAPER p: BORDER INT (RND*8): BRIGHT INT (RND*2): DRAW OVER 1;120,120,INT (RND*300)*PI: PAUSE 60: IF INKEY$="0" THEN ON ERR RESET : STOP
3 RUN
4 SAVE "draw" LINE 1
5 REM - Keying "0"during the PAUSE 60 of line 2 permits stop-ping the routine. Otherwise the ON ERR instruction will ignore "STOP" and "BREAK".

The following short programs were borrowed from the Sinclair Timex User Groups Newsletter of the Boston Computer Society (Volume 3, issue 4). As you can see some pretty neat effects can be achieved using only one program line with the 2068.

  10 INPUT "type a number, 0 to 50 ";x: INPUT "how many repeats ? ";y: FOR n=1 TO y: PLOT 65,27: DRAW OVER 1;120,120,(x[illegible]10+3)[illegible]3*PI: NEXT n
Input 5,5 - one-liner screen output
Input 5,5 – one-liner screen output
  10 FOR x=0 TO 65 STEP .1: PLOT 2*x*SIN x+125,x*COS x+88: NEXT x
Spiral one-liner screen output
Spiral one-liner screen output
  10 FOR x=0 TO 254: PLOT x,40*SIN (x/10)+88: DRAW 10,10: DRAW -10,5: NEXT x
Sine wave one-liner screen output
Sine wave one-liner screen output

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