10      REM
20      REM LORES80 CONCENTRIC CIRCLES
30      REM
40      REM BY JIM SATHER --- 6/21/84
50      REM

70      REM
80      REM FOR EMULATOR : DEADC0DE.ORG/apple2
90      REM

110     REM
120     REM INITIALIZE
130     REM
140     STR80 = -16383 : COL80 = -16371 : NOMIX = -16302 : MBD = -16300
150     AUX = -16299 : FRCTXT = -16290 : LCLEER = -1998 : CLR = 48

170     GR : POKE STR80,0 : POKE NOMIX,0 : POKE COL80,0 : POKE FRCTXT,0
180     POKE AUX,0 : CALL LCLEER : POKE MBD,0 : CALL LCLEER : REM CLEAR SCREEN

200     REM
210     REM COLOR / CIRCLE COMPUTATIONS
220     REM
230     PTS = 208 : REM NUMBER OF ANGLES SAMPLED
240     FOR ANGLE = 0 TO PTS-1
250         A1 = 6.2831852 * ANGLE / PTS : SI = SIN(A1) : CO = COS(A1)
260         FOR C = 0 TO 7 : COLOR = C : IF ANGLE > PTS/2 THEN COLOR = C+8
270             IF C = 0 THEN COLOR = 15
280             R = 24 - C*3 : V = 24 - SI * R : H = 40 + CO * R * 1.36 : GOSUB 330
290         NEXT C : NEXT ANGLE
295     POKE 7987,255
300     GOTO 300

320     REM
330     REM PLOT H,V (H = 0-79, V = 0-47)
340     REM
350     H2 = INT(H) / 2
360     IF H2 - INT(H2) THEN POKE MBD,0 : PLOT H2,V : GOTO 400
370     POKE AUX,0 : CSAV = PEEK(CLR) : C2 = CSAV / 2 : C2% = C2
380     IF C2 - C2% THEN C2% = C2% + 128
390     POKE CLR,C2% : PLOT H2,V : POKE CLR,CSAV
400     RETURN

