home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib38b.dsk
/
HPLOT.DEMO1.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
2KB
|
50 lines
10 REM ***************************
20 REM * HPLOT.DEMO1 *
30 REM * BY DAVID HARRIS *
40 REM * COPYRIGHT(C) 1990 *
50 REM * MINDCRAFT PUBL. CORP. *
60 REM * CONCORD, MA 01742 *
70 REM ***************************
80 :
90 : REM ** INITIALIZE **
100 PRINT CHR$(21)
110 HCOLOR= 3
120 HGR : HPLOT 0,176 TO 279,176
130 HGR2 : HPLOT 0,176 TO 279,176
140 FOR LOOP = 0 TO 5: READ WIDTH(LOOP): NEXT LOOP
150 X = 50:Y = 50
160 SCREEN = 0
170 X1 = 10:Y1 = 10: REM NULL VALUES
180 :
190 : REM ** ANIMATE **
200 :
210 FOR T = 1 TO 104
220 POKE 230,32 *(SCREEN +1)
230 X2 = X:Y2 = Y
240 X = X1:Y = Y1: HCOLOR= 0: GOSUB 330
250 X1 = X2:Y1 = Y2
260 READ Y:Y = 170 -Y:X = T *2 +5
270 HCOLOR= 3: GOSUB 330
280 POKE -16300 +SCREEN,0
290 SCREEN = 1 -SCREEN
300 NEXT T
310 WAIT -16384,128: TEXT : HOME : END
320 :
330 : REM ** DRAW BALL **
340 :
350 FOR LOOP = 0 TO 5
360 HPLOT X -WIDTH(LOOP),Y -5 +LOOP TO X +WIDTH(LOOP),Y -5 +LOOP
370 HPLOT X -WIDTH(LOOP),Y +5 -LOOP TO X +WIDTH(LOOP),Y +5 -LOOP
380 HPLOT X,Y
390 NEXT LOOP
400 RETURN
410 DATA 1,3,4,4,5,5
420 :
430 : REM ** PATH DATA **
440 :
450 DATA 150,147,145,142,140,135,130,125,120,112,105,97,90,80,70,60,50,37,25,12,0
460 DATA 10,20,30,40,47,55,62,70,75,80,85,90,92,95,97,100,97,95,92,90,85,80,75,70,62,55,47,40,30,20,10,0
470 DATA 7,15,22,30,35,40,45,50,52,55,57,60,57,55,52,50,45,40,35,30,22,15,7,0
480 DATA 5,10,15,20,22,25,27,30,27,25,22,20,15,10,5,0
490 DATA 2,5,7,10,7,5,2,0
500 DATA 0,0,0