0 REM CIRCLES.BAS.txt

10 REM - Nested Circles

20 GOSUB 1000 : REM Go Clear the Screen Routine

30 PI = 3.14159

40 DZOP "C",1 : REM Color mode  [Range = 16-23]
50 C=17 : REM Color code
60 XC = 128 : YC = 128 : REM Set center area

70 FOR COLOR = 17 TO 23 : REM New Color, Sketch Again
80 IF COLOR > 23 THEN COLOR = 16
90 GOSUB 2000
100 NEXT COLOR

999 GOTO 9000

1000 REM Clear the Screen Routine
1010 DZOP "C",16
1020 DZOP "P",0,0
1030 DZOP "R",255,255
1080 RETURN


2000 REM Start Calculating and Plotting the Points on the Display
2010 DZOP "C",COLOR
2020 FOR R = 10 TO 100 STEP 20 : REM Loop to draw circles w/increasing radius

2030  FOR T = 0 TO (2*PI) STEP 0.1 : REM Loop to Sketch Dots
2040   X = XC + R * COS(T) : Y = YC + R * SIN(T)
2050   DZOP "P", X,Y : REM Moves cursor to a point on the circle
2060   DZOP "D"      : REM Plots a point on the circle
2070  NEXT T : REM Get the next point to plot on the circle

2080 NEXT R : REM Get the next Radius for the next Circle
2090 RETURN

9000 REM End Routine
9010 FOR G = 0 TO 4
9020 PRINT CHR$(7)
9030 FOR PAUSE = 0 TO 499 : NEXT PAUSE
9040 NEXT G
9990 END
