PLOT
PLOT <x co-ordinate>,<y co-o r d i n a t e > [ , < m a s k e d i n k ]
1 0 M O D E 2 : P R I N T " E n t e r 4 n u m b e r s ,
s e p a r a t e d b y c o m m a s " : P R I N T
2 0 P R I N T " E n t e r X o r i g i n ( O-639),
Y origin (O-399), radius and
a n g l e t o t o s t e p " : I N P U T x , y , r , s
30 ORIGIN x,y
4 0 F O R a n g l e = 1 t o 3 6 0 S T E P s
5 0 X P O I N T = r * C O S ( a n g l e )
6 0 Y P O I N T = r * S I N ( a n g l e )
7 0 P L O T X P O I N T , Y P O I N T
74 REM MOVE 0,0
7 5 R E M D R A W X P O I N T , Y P O I N T
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-
R EM
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
RAD
ian mode of angular calculation, so the ‘angle’ in
each step is considerably more than one degree. Enter the command
2 5 D E G
and run again.
Associated keywords:
D R A W , D R A W R , P L O T , P L O T R , M O V E , M O V E R , O R I G I N ,
T E S T , T E S T R , X P O S , Y P O S
PLOTR
P L O T R < x co -ordinate>, <y co-o r d i n a t e > [ , < m a s k e d i n k > ]
5 DEG
1 0 M O D E 2 : P R I N T " E n t e r 4 n u m b e r s ,
s e p a r a t e d b y c o m m a s " : P R I N T
2 0 P R I N T " E n t e r X o r i g i n ( O-639 ),
Y origin (O-399), radius and
a n g l e t o t o s t e p " : I N P U T x , y , r , s
30 ORIGIN x,y
4 0 F O R a n g l e = 1 t o 3 6 0 S T E P s
5 0 X P O I N T = r * C O S ( a n g l e )
6 0 Y P O I N T = r * S I N ( a n g l e )
7 0 P L O T R X P O I N T , Y P O I N T
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:
D R A W , D R A W R , P L O T , P L O T R , M O V E , M O V E R , O R I G I N ,
T E S T , T E S T R , X P O S , Y P O S
Содержание CPC464
Страница 1: ......
Страница 32: ...or you can type 3e1 1e1 ENTER 300 2 3000x1000 Type 3e3 1e3 ENTER 3000000 3 3000x0 001 Type 3e3 1e 3 ENTER 3 ...
Страница 102: ...PRINT 10 AND 12 Results in 8 PRINT 10 AND 1000 Results in 8 again ...
Страница 118: ...TO DO DRAW THIS PAGE ...
Страница 219: ...actual value may be made to vary during the execution of a program ...
Страница 240: ...Text and WINDOW planner Mode 2 80 Columns ...
Страница 241: ......
Страница 245: ...Sound envelope Music planner sheet ...