Personal Computer News
25th August 1984
Published in Personal Computer News #075
Turn a Laser Beam On your Spectrum
This program can be used to great effect in Spectrum programs. It simulates a laser beam etching an image on the screen. The source of the laser can be altered by changing the values of view and point. Changing the value of Z in line 40 to 0 leaves a 3D image stretching into the horizon.
Andy Goodsell, Kenley, Surrey
10 REM LASER-WRITER (C) ANDY GOODSELL
20 REM MAIN ROUTINE
30 PAPER 7: INK 0: BRIGHT 0: BORDER 7: CLS
40 LET view = 100: LET point = 40: LET z = 1: REM LET z = 0 FOR 3-D EFFECT
50 FOR i = 1 TO 28
60 READ a,b,c,d
70 PLOT a,b : PLOT view, point: DRAW OVER z; a-view,b-point: PLOT view, point: DRAW OVER z; a-view,b-point
80 PLOT c,d : PLOT view, point: DRAW OVER z; c-view,d-point: PLOT view, point: DRAW OVER z; c-view,d-point
90 PLOT a,b: DRAW c-a,d-b
100 NEXT i
110 PLOT OVER 1; view,point
120 REM END OF MAIN ROUTINE
130 REM DATA FOR "PCN" FOLLOWS>>>
140 DATA 7,127,7,31
150 DATA 7,31,23,31
160 DATA 23,31,23,63
170 DATA 23,63,63,63
180 DATA 63,63,63,127
190 DATA 63,127,7,127
200 DATA 23,111,47,111
210 DATA 47,111,47,79
220 DATA 47,79,23,79
230 DATA 23,79,23,111
240 DATA 87,31,87,127
250 DATA 87,127,143,111
260 DATA 143,127,143,111
270 DATA 143,111,103,111
280 DATA 103,111,103,47
290 DATA 103,47,143,47
300 DATA 143,31,87,31
310 DATA 169,31,169,127
320 DATA 169,31,169,127
330 DATA 169,127,191,127
340 DATA 191,127,215,71
350 DATA 215,71,215,127
360 DATA 215,127,231,127
370 DATA 231,127,231,31
380 DATA 231,31,207,31
390 DATA 207,31,183,87
400 DATA 183,87,183,31
410 DATA 183,31,169,31
420 REM END OF DATA