Afterimage Test, graphics demo (AFTIMAGE.BAS)
Afterimage Test, graphics demo by Nick Koziupa, 34
Description
Afterimage Test, graphics demo by Nick Koziupa, 34
From the Antic disk of July 1987 (Vol. 6 No. 3).
From the Antic Software Archive at atarimagazines.com. The program remains the property of its author and publisher.
What is in this file
Atari BASIC program · 4.1 KB
- Dialect
- Atari BASIC
- Lines
- 100
- Variables
A,COL,LUM,SHAPE,LINE,N,X,Y,DE
BASIC listing (100 lines)
70 REM AFTERIMAGE TEST
80 REM BY NICK KOZIUPA
90 REM (c) 1987, ANTIC PUBLISHING
100 GOSUB 1000
110 REM COLOR CHOICE
120 ? "↰":? :POKE 752,1
130 ? " Afterimage Test"
140 ? :? "Choose the color of the object to focus on:"
150 ? :? "1) Red":? "2) Blue":? "3) Yellow":? "4) Green":? "5) Purple"
160 ? "6) Orange"
170 GET #1,A
180 IF A=49 THEN COL=4:LUM=2:GOTO 250
190 IF A=50 THEN COL=8:LUM=2:GOTO 250
200 IF A=51 THEN COL=1:LUM=8:GOTO 250
210 IF A=52 THEN COL=12:LUM=2:GOTO 250
220 IF A=53 THEN COL=5:LUM=2:GOTO 250
230 IF A=54 THEN COL=2:LUM=6:GOTO 250
240 GOTO 170
250 REM SHAPE CHOICE
260 ? "↰":?
270 ? " Afterimage Test"
280 ? :? "Choose the shape of the object to focus on:"
290 ? :? "1) Circle":? "2) Square":? "3) Triangle":? "4) Cross"
300 GET #1,A
310 IF A=49 THEN SHAPE=1:GOTO 360
320 IF A=50 THEN SHAPE=2:GOTO 360
330 IF A=51 THEN SHAPE=3:GOTO 360
340 IF A=52 THEN SHAPE=4:GOTO 360
350 GOTO 300
360 ON SHAPE GOSUB 380,600,690,760
370 GOTO 110
380 REM CIRCLE TEST
390 GRAPHICS 7+16:POKE 710,10:POKE 712,10:COLOR 1:POKE 708,10
400 RESTORE 500
410 POKE 765,1
420 FOR N=0 TO 95
430 READ X,Y:PLOT X,Y
440 IF N>55 THEN XIO 18,#6,0,0,"S:"
450 NEXT N
460 SETCOLOR 0,COL,LUM
470 FOR DE=1 TO 3500:NEXT DE
480 POKE 708,10
490 FOR DE=1 TO 2500:NEXT DE:RETURN
500 DATA 77,33,78,33,79,33,80,33,81,33,82,33,83,33,84,34,85,34,86,34
510 DATA 87,35,88,35,89,36,90,37,91,38,92,39,92,40,93,40,93,41,93,42
520 DATA 94,42,94,43,94,44,94,45,95,45,95,46,95,47,95,48,95,49,95,50
530 DATA 95,51,94,51,94,52,94,53,94,54,93,54,93,55,93,56,92,56,92,57
540 DATA 91,58,90,59,89,60,88,61,87,61,86,62,85,62,84,62,83,63,82,63
550 DATA 81,63,80,63,79,63,78,63,77,63,76,62,75,62,74,62,73,61,72,61
560 DATA 71,60,70,59,69,58,68,57,68,56,67,56,67,55,67,54,66,54,66,53
570 DATA 66,52,66,51,65,51,65,50,65,49,65,48,65,47,65,46,65,45,66,45
580 DATA 66,44,66,43,66,42,67,42,67,41,67,40,68,40,68,39,69,38,70,37
590 DATA 71,36,72,35,73,35,74,34,75,34,76,34
600 REM SQUARE TEST
610 GRAPHICS 7+16:POKE 710,10:POKE 712,10:COLOR 1:POKE 708,10
620 PLOT 64,35:DRAWTO 96,35:DRAWTO 96,62:DRAWTO 64,62
630 POKE 765,1
640 FOR X=62 TO 35 STEP -1:PLOT 64,X:XIO 18,#6,0,0,"S:":NEXT X
650 SETCOLOR 0,COL,LUM
660 FOR DE=1 TO 3500:NEXT DE
670 POKE 708,10
680 FOR DE=1 TO 2500:NEXT DE:RETURN
690 REM TRIANGLE TEST
700 GRAPHICS 7+16:POKE 710,10:POKE 712,10:COLOR 1:POKE 708,10
710 FOR X=60 TO 100:PLOT 80,32:DRAWTO X,64:NEXT X
720 SETCOLOR 0,COL,LUM
730 FOR DE=1 TO 3500:NEXT DE
740 POKE 708,10
750 FOR DE=1 TO 2500:NEXT DE:RETURN
760 REM CROSS TEST
770 GRAPHICS 7+16:POKE 710,10:POKE 712,10:COLOR 1:POKE 708,10
780 FOR X=75 TO 85:PLOT X,35:DRAWTO X,62:NEXT X
790 FOR X=44 TO 53:PLOT 64,X:DRAWTO 96,X:NEXT X
800 SETCOLOR 0,COL,LUM
810 FOR DE=1 TO 3500:NEXT DE
820 POKE 708,10
830 FOR DE=1 TO 2500:NEXT DE:RETURN
1000 GRAPHICS 0:POKE 752,1:POKE 82,0:? "↰"
1010 ? :? :? " Afterimage Test "
1015 ? :? " by Nick Koziupa"
1020 FOR DE=1 TO 350:NEXT DE
1040 CLOSE #1:OPEN #1,4,0,"K:"
1045 ? "↰":? :? " Afterimage Test"
1050 ? :? "Do you need instructions (Y/N)?";
1060 GET #1,A
1070 IF A=89 THEN 1100
1080 IF A=78 THEN RETURN
1090 GOTO 1060
1100 REM INSTRUCTIONS
1110 ? "↰ Afterimage Test by Nick Koziupa "
1120 ? :? " This program demonstrates afterimages":? "(how your eyes percieve an image ";
1130 ? "after it has disappeared.)":? :? " After selecting an object to view,"
1140 ? "the screen will change to a dull shade":? "of white. Within seconds, the shape"
1150 ? "will appear at the center of the":? "screen. Fix your eyes upon the center"
1160 ? "of the object. After about 15":? "seconds, the object will disappear."
1170 ? "Continue to look at the area where the":? "shape had been. If the experiment was"
1180 ? "successful, the image will still be":? "visible, but now in the opposite"
1190 ? "color.":? :? " Press [START] to begin "
1200 IF PEEK(53279)<>6 THEN 1200
1210 RETURN
