AMSTRAD CPC464 User Manual page 164

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

PLOT
P L O T < x c o-o r d i n a t e > , < y c o-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 o r i g i n (O -3 9 9 ) , r a d i u s a n d
a n g l e t o t o s t e p " : I N P U T x , y , r , s
3 0 O R I G I N 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
7 4 R E M M O V E 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-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 RAD ian 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
P L O T R < x co -o r d i n a t e > , < y c o-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 o r i g i n ( O-3 9 9 ) , r a d i u s a n d
a n g l e t o t o s t e p " : I N P U T x , y , r , s
3 0 O R I G I N 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
8 0 N E X T : G O T O 4 0
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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents