Compucolor.org – Virtual Media

Listing of file='12P3.BAS;01' on disk='vmedia/color_graphics_1_suits-sector.ccvf'

5 REM  PROGRAM 12.3
6 REM  SIMULATING A RADAR SCOPE
9
10 PLOT 6,2,12,30:REM  COLOR=GREEN; CLEAR SCREEN; FLAG ON
19
20 R= 2* 3.1415926:REM  RADIANS IN A CIRCLE
30 S= .05:REM  STEP SIZE
40 C= 30:REM  CIRCLE RADIUS
50 F= 40:REM  SCALING FACTOR FOR Y CO-ORDINATE
59
60 X1= 63:Y1= 63:REM  INITIALIZE A "PREVIOUS VECTOR" OF LENGTH=0
69
70 PLOT 2:REM  GENERAL PLOT MODE
79
80 FOR J= 0TO RSTEP S
90   PLOT 253:REM  POINT
100  PLOT 63,63:REM  CENTER OF CIRCLE
110  PLOT 242:REM  VECTOR PLOT
118
119  REM  GET NEXT VECTOR'S POINTS & PLOT IT
120  X2= 63+ C* COS (J):Y2= 63+ F* SIN (J)
130  PLOT X2,Y2
138
139  REM  ERASE PREVIOUS VECTOR
140  PLOT 253,63,63,242,X1,Y1
148
149  REM  NEW VECTOR BECOMES "PREVIOUS VECTOR"
150  X1= X2:Y1= Y2
160 NEXT
169
170 GOTO 80:REM  BACK FOR ANOTHER SWEEP