-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
10 REM Palette Animation Example | ||
20 : | ||
30 MODE 0 | ||
40 C=1:Y=-1 | ||
50 FOR I=0 TO 2000 | ||
60 IF Y<0 X=640:Y=10:VX=COS(RND(1)*PI)*9:VY=20+RND(1)*30:MOVE X,Y | ||
70 X=X+VX | ||
80 Y=Y+VY | ||
90 VY=VY-1 | ||
100 GCOL 0,C:C=1+(C MOD15) | ||
110 DRAW X,Y | ||
120 NEXT I | ||
130 O=3:C=2:P=1 | ||
140 REPEAT | ||
150 *FX19 | ||
160 COLOUR C,&C0,0,0 | ||
170 COLOUR P,&C0,&40,0 | ||
180 COLOUR O,0,0,0 | ||
190 O=P:P=C:C=1+(C MOD15) | ||
200 UNTIL FALSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
10 REM Hat Graph | ||
20 : | ||
30 CLS | ||
40 REM VDU 19,1,1,0,0,0 | ||
50 DIM RR(320) | ||
60 FOR I=0 TO 320:RR(I)=193:NEXT I | ||
70 XP=144:XR=4.71238905:XF=XR/XP | ||
80 FOR ZI=64 TO -64 STEP -2 | ||
90 ZT=ZI*2.25:ZS=ZT*ZT | ||
100 XL=INT(SQR(20736-ZS)+0.5) | ||
110 FOR XI=0-XL TO XL STEP.5 | ||
120 XT=SQR(XI*XI+ZS)*XF | ||
130 YY=(SIN(XT)+SIN(XT*3)*0.4)*56 | ||
140 X1=XI+ZI+160:Y1=90-YY+ZI | ||
150 IF X1<0 THEN GOTO 190 | ||
160 IF RR(X1)<=Y1 THEN 190 | ||
170 RR(X1)=Y1 | ||
180 PLOT 69,X1*4,850-Y1*4+32 | ||
190 NEXT XI:NEXT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
10 REM PROGRAM TO DRAW MANDLEBROT SET | ||
20 REM P.MAINWARING, MARCH 19TH 1990 | ||
30 : | ||
40 MODE 12 | ||
50 ITERS=32 | ||
60 SCALE=1 | ||
70 XRANGE=-2.5 | ||
80 YRANGE=-1 | ||
90 DIM A%(3),B%(3) | ||
100 : | ||
110 FOR I%=0 TO 3 | ||
120 READ A%(I%),B%(I%) | ||
130 NEXT | ||
140 : | ||
150 DATA 0,0,1,1,0,1,1,0 | ||
160 : | ||
170 XSTP=1280/320 | ||
180 YSTP=1024/200 | ||
190 COLS=64 | ||
200 MAXX=1280 | ||
210 MAXY=1024 | ||
220 FOR I%=0 TO 3 | ||
230 FOR J%=A%(I%) TO MAXY/SCALE STEP YSTP | ||
240 FOR K%=B%(I%) TO MAXX/SCALE STEP XSTP | ||
250 CR=XRANGE+K%*4/(MAXX/SCALE) | ||
260 CI=YRANGE+J%*3/(MAXX/SCALE) | ||
270 ZM=0:ZR=0:ZI=0:ZR2=0:ZI2=0 | ||
280 IT=0 | ||
290 REPEAT | ||
300 Z1=ZR2-ZI2+CR | ||
310 Z2=2*ZR*ZI+CI | ||
320 ZR=Z1 | ||
330 ZI=Z2 | ||
340 ZR2=ZR*ZR | ||
350 ZI2=ZI*ZI | ||
360 ZM=ZR2+ZI2 | ||
370 IT=IT+1 | ||
380 UNTIL IT=ITERS OR ZM>=4 | ||
390 C%=COLS-1-INT(IT/(ITERS/(COLS-1))) | ||
430 GCOL 0,C% | ||
440 PLOT 69,K%,J% | ||
450 NEXT | ||
460 NEXT | ||
470 NEXT | ||
480 A%=GET | ||
490 MODE 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
10 REM AMAZING GRACE | ||
20 REM | ||
30 REM | ||
40 REPEAT | ||
50 REPEAT | ||
60 READ P%,D% | ||
70 SOUND 1,-10,P%,D% | ||
80 UNTIL P%=0 AND D%=0 | ||
90 RESTORE | ||
100 UNTIL FALSE | ||
110 REM | ||
120 DATA 33,12,53,24,69,4,61,4,53,4,69,24,61,12,53,24,41,12,33,36,53,24,69,4,61,4,53,4,69,24,61,12,81,60 | ||
130 DATA 69,12,81,24,69,4,61,4,53,4,69,24,61,12,53,24,41,12,33,36,53,24,69,4,61,4,53,4,69,24,61,4,69,4,61,4,53,60,0,0 |