PLOT
PLOT <x co-ordinate>,<y co-ordinate>[,<masked ink]
10 MODE 2:PRINT "Enter 4 numbers,
separated by commas":PRINT
20 PRINT "Enter X origin (O-639),
Y origin (O-399), radius and
angle to to step":INPUT x,y,r,s
30 ORIGIN x,y
40 FOR angle = 1 to 360 STEP s
50 XPOINT = r*COS(angle)
60 YPOINT = r*SIN(angle)
70 PLOT XPOINT,YPOINT
74 REM MOVE 0,0
75 REM DRAW XPOINT,YPOINT
80 NEXT
COMMAND: Try 320,200,20,1 as your first response. PLOT is the same as MOVE, except that the
pixel at the destination is written. If you un-REM line 75 above and REM line 70 to make it
inoperative, you will see the difference. (Un-REM line 74 to fill the circle).
Note that the process fills in the outline of the circle by repeated running around the perimeter.
Remember that this program has not reset the RADian mode of angular calculation, so the ‘angle’ in
each step is considerably more than one degree. Enter the command 25 DEG and run again.
Associated keywords: DRAW, DRAWR, PLOT, PLOTR, MOVE, MOVER, ORIGIN,
TEST,TESTR,XPOS,YPOS
PLOTR
PLOTR <x co-ordinate>, <y co-ordinate>[, <masked ink>]
5 DEG
10 MODE 2:PRINT "Enter 4 numbers,
separated by commas":PRINT
20 PRINT "Enter X origin (O-639),
Y origin (O-399), radius and
angle to to step":INPUT x,y,r,s
30 ORIGIN x,y
40 FOR angle = 1 to 360 STEP s
50 XPOINT = r*COS(angle)
60 YPOINT = r*SIN(angle)
70 PLOTR XPOINT,YPOINT
80 NEXT: GOTO 40
COMMAND: Try 320,0,2,1 in reponse. PLOTR is the same as DRAWR except that only the pixel at
the destination is written.
Associated keywords: DRAW, DRAWR, PLOT, PLOTR, MOVE, MOVER, ORIGIN,
TEST,TESTR,XPOS,YPOS