Further Details - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

Further details ....
For a more comprehensive guide to graphics on the CPC6128, see the section
'Graphically speaking' in the chapter entitled 'At your leisure .... '.
To conclude this section, here are a few graphics demonstration programs which
incorporate a lot of the programming commands and keywords that you should now
understand. Each of the programs draws continuous patterns on the screen.
new
10 BORDER 0:GRAPHICS PEN 1
20 m=CINT(RND*2):MODE m
30 i1=RND*26:i2=RND*26
40 IF ABS(i1-i2)<10 THEN 30
50 INK 0,i1:INK 1,i2
60 s=RND*5+3:0RIGIN 320,-100
70 FOR x= -1000 TO 0 STEP
5
80 MOVE
0~0:DRAW
x,300:DRAW 0,600
90 MOVE 0,0:DRAW -x,300:DRAW 0,600
100 NEXT:FOR t=1 TO 2000:NEXT:GOTO 20
run
10 MODE 1:BORDER 0:PAPER 0
20 GRAPHICS PEN 2:INK 0,0:i=14
30 EVERY 2200 GOSUB 150
40 flag=0:CLG
50 INK 2,14+RND*12
60 b%=RND*5+1
70 c%=RND*5+1
80 ORIGIN 320,200
90 FOR a=0 TO 1000 STEP PI/30
100 x%=100*COS(a)
110 MOVE x%,y%
120 DRAW 200*COS(a/b%),200*SIN(a/c%)
130 IF flag=1 THEN 40
140 NEXT
150 flag=1:RETURN
run
Foundation Course
Chapter 1 Page 65

Advertisement

Table of Contents
loading

Table of Contents