home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FreeWare Collection 3
/
FreeSoftwareCollection3pd199x-jp.img
/
kxc
/
basic386
/
hs_grd
/
repgdd02.bas
< prev
next >
Wrap
BASIC Source File
|
1980-01-02
|
4KB
|
123 lines
1000 '-=///////////////////////////////////////////////////////////////=-
1010 '
1020 ' 楕円球体グラデーションサンプルプログラム
1030 ' Copyright(c) KXC U・K UOTA June 1990
1040 '
1050 '「まるでレイトレの様な、美しい高速天然色感を御堪能下さい。(魚)」
1060 '
1070 '-=///////////////////////////////////////////////////////////////=-
1080 '
1090 SCREEN@1 : CLS : CLEAR ,,2000,50000,10000
1100 DEFSNG A-Z : DEFLNG I,X,Y,R : DEFINT J
1110 DIM IVALUE( 100 ),JSQDT( 25600/2 )
1120 I=0 : ICB=0 : ICR=0 : ICG=0
1130 IB_GRD=0 : LOADM "BALL_GR7.REX",IB_GRD
1140 ID_GRD=&H400 : LOADM "DAEN_GR4.REX",ID_GRD
1150 IAD_SQDT =VARPTR( JSQDT( 0 ) )
1160 IAD_VALUE=VARPTR( IVALUE( 0 ) )
1170 LOAD@ "isqdt.dat",JSQDT
1180 CD PLAY
1190 :
1200 *LOOP
1210 CLS
1220 GOSUB *DEMO4
1230 GOSUB *DEMO2
1240 GOSUB *DEMO1
1250 GOSUB *DEMO3
1260 FOR IWT=0 TO 10000 : NEXT IWT
1270 GOTO *LOOP
1280 ' ///// デモ1 /////
1290 *DEMO1
1300 ICG=0 : ICR=0 : ICB=255
1310 FOR I=5 TO 159 STEP 10
1320 ICG=ICG+15 : ICR=ICR+14 : ICB=ICB-12
1330 R2=I*12/16 : R1=R2/12 : R3=R1*8 : R=I/6 : I2=I*2/3
1340 IX=160+COS(I/10)*I2
1350 IY=120+SIN(I/10)*I2
1360 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,160-I2,120 ,R1,R2,R3,IAD_VALUE
1370 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,160 ,120-I2,R2,R1,R3,IAD_VALUE
1380 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,160+I2,120 ,R1,R2,R3,IAD_VALUE
1390 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,160 ,120+I2,R2,R1,R3,IAD_VALUE
1400 CALLM IB_GRD,IAD_SQDT,ICB,ICG,ICR,IX , IY,R,IAD_VALUE
1410 NEXT
1420 RETURN
1430 :
1440 ' ///// デモ2 /////
1450 *DEMO2
1460 ICB=INT( 255*RND( 1 ) )
1470 R1=12 : R2=8 : R=6
1480 IT=IT+10 : IF IT=100 : IT=0
1490 FOR I=10 TO 119 STEP 8
1500 IT=IT+16
1510 FOR IX=0 TO 319 STEP 6
1520 ICG=ICG+8 : IF ICG >= 256 : ICG=0
1530 ICR=ICR+5 : IF ICR >= 256 : ICR=0
1540 IY=120+SIN( ( IX-IT )/30 )*I : I2=I/2
1550 CALLM ID_GRD,IAD_SQDT,ICG,ICG,ICR,IX ,IY ,R1,R1,I2,IAD_VALUE
1560 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,IX ,IY+R,R ,R ,I2,IAD_VALUE
1570 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,IX ,IY-R,R ,R ,I2,IAD_VALUE
1580 CALLM ID_GRD,IAD_SQDT,ICG,ICB,ICR,IX+R1,IY ,R ,R ,I2,IAD_VALUE
1590 CALLM ID_GRD,IAD_SQDT,ICG,ICB,ICR,IX-R1,IY ,R ,R ,I2,IAD_VALUE
1600 NEXT
1610 NEXT
1620 RETURN
1630 ' ///// デモ3 /////
1640 *DEMO3
1650 ICG=0 : ICR=0 : ICB=222
1660 R1=12 : R2=8 : R=6 : IE=255
1670 FOR ICR=0 TO IE STEP 63
1680 FOR I=1 TO 159 STEP 16
1690 CALLM ID_GRD,IAD_SQDT,255,ICR,255,80 ,120,12,60,I,IAD_VALUE
1700 NEXT
1710 NEXT
1720 FOR ICR=0 TO IE STEP 63
1730 FOR I=1 TO 159 STEP 16
1740 CALLM ID_GRD,IAD_SQDT,255,ICR,255,80 ,60 ,40,10,I,IAD_VALUE
1750 NEXT
1760 NEXT
1770 FOR ICR=0 TO IE STEP 63
1780 FOR I=1 TO 159 STEP 16
1790 CALLM ID_GRD,IAD_SQDT,255,ICR,255,80 ,180,40,10,I,IAD_VALUE
1800 NEXT
1810 NEXT
1820 FOR ICR=0 TO IE STEP 63
1830 FOR I=1 TO 159 STEP 16
1840 CALLM ID_GRD,IAD_SQDT,255,ICR,255,210,120,12,60,I,IAD_VALUE
1850 NEXT
1860 NEXT
1870 FOR ICR=0 TO IE STEP 63
1880 FOR I=1 TO 159 STEP 16
1890 CALLM ID_GRD,IAD_SQDT,255,ICR,255,290,120,12,60,I,IAD_VALUE
1900 NEXT
1910 NEXT
1920 FOR ICR=0 TO IE STEP 63
1930 FOR I=1 TO 159 STEP 16
1940 CALLM ID_GRD,IAD_SQDT,255,ICR,255,250,60 ,40,10,I,IAD_VALUE
1950 NEXT
1960 NEXT
1970 FOR ICR=0 TO IE STEP 63
1980 FOR I=1 TO 159 STEP 16
1990 CALLM ID_GRD,IAD_SQDT,255,ICR,255,250,180,40,10,I,IAD_VALUE
2000 NEXT
2010 NEXT
2020 FOR ICR=0 TO IE STEP 63
2030 FOR I=1 TO 159 STEP 16
2040 CALLM ID_GRD,IAD_SQDT,255,ICR,255,160,120,20,20,I,IAD_VALUE
2050 NEXT
2060 NEXT
2070 RETURN
2080 :
2090 ' ///// デモ4 /////
2100 *DEMO4
2110 ICG=INT( 255*RND ) : ICR=INT( 255*RND ) : ICB=INT( 255*RND )
2120 FOR FI=0 TO 1250
2130 R3=R3+1 : IF R3=160 : R3=0
2140 IX=160+COS( FI/8 )*80 : IY=120+SIN( FI/7 +4 )*60
2150 CALLM ID_GRD,IAD_SQDT,ICG,ICR,ICB,IX,IY,10,10,R3,IAD_VALUE
2160 IX=160+COS( FI/12+2 )*120 : IY=120+SIN( FI/11+2 )*90
2170 CALLM ID_GRD,IAD_SQDT,ICR,ICB,ICG,IX,IY,20,10,R3,IAD_VALUE
2180 IX=160+COS( FI/16+4 )*160 : IY=120+SIN( FI/15 )*120
2190 CALLM ID_GRD,IAD_SQDT,ICB,ICG,ICR,IX,IY,10,20,R3,IAD_VALUE
2200 NEXT
2210 RETURN