/* Circle for Nascom Basic tfurrows@sdf.org, tfurrows@grex.org Just a circle plotter VT/ANSI escape sequences are used to move the pointer around, and "#" is used to plot the circle. Following is the code, without line numbers for easier modification, and with line numbers for easier copy/paste/run. */ /* no line numbers */ WIDTH 79 PRINT CHR$(27);"[2J" PI=3.141592654 CX=40:CY=10:R=550 FOR A=0 to 360 STEP 2 FOR A=0 to 360 STEP 0.5 AR=A*(PI/180) X=INT((R*COS(AR))+CX) Y=INT((R*SIN(AR))+CY) SL$=MID$(STR$(Y),2) SC$=MID$(STR$(X),2) M$=CHR$(27)+"["+SL$+";"+SC$+"H" PRINT M$;"#"; NEXT A /* with line numbers */ 10 WIDTH 132 20 PRINT CHR$(27);"[2J" 30 PI=3.141592654 40 CX=60:CY=16:R=15 50 FOR A=0 to 360 STEP 2 60 AR=A*(PI/180) 70 X=INT((R*COS(AR))+CX) 80 Y=INT((R*SIN(AR))+CY) 90 SL$=MID$(STR$(Y),2) 100 SC$=MID$(STR$(X),2) 110 M$=CHR$(27)+"["+SL$+";"+SC$+"H" 120 PRINT M$;"#"; 130 NEXT A