home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 4
/
AUCD4.iso
/
acornuser
/
1998
/
apr1998
/
regulars
/
StarInfo
/
Stoner
/
Satin
(
.txt
)
next >
Wrap
RISC OS BBC BASIC V Source
|
1997-06-30
|
2KB
|
74 lines
True Plasma Drawer
by Nigel Stoner 1997
doit:
" in line ";
setpal
ti%=
fullscrn
-ti%)/100))
<>22
"OS_SWINumberFromString",,"ColourTrans_SetGCOL"
col%
cx%(16),cy%(16),pal%(255)
pickcs
x%,y%,b%,ox%,oy%
x%=0
1280
x%,0,1,1024:
0,x%*.75,1280,1:
0,10)"Place your attractors with Select"
centre%=3:
3,15
a%=0
centre%:
x%,y%,b%:
b%=0:ox%=x%:oy%=y%:
x%,y%,128
x%,y%,b%
ox%<>x%
oy%<>y%
ox%,oy%,128:ox%=x%:oy%=y%:
ox%,oy%,128
b%=4:cx%(a%)=x%:cy%(a%)=y%:
setpal
set pallette
a%=0
a%,a%*16,a%*16,a%*16::
fullscrn
centre%=3:
pickcs
0,12)"Enter Band Width (1-99)";
band:
band >0
band <100
band=1-(band/100)
over%=8:start%=0
y%= start%
1024-over%
over%:
x%= start%
1280-over%
over%:xsum%=0:ysum%=0:
a%=0
centre%:dx%=cx%(a%)-x%:dy%=cy%(a%)-y%:d2%=dx%*dx%+dy%*dy%
d2% <> 0 adj%=(dx%*dy%):x2%=(dx%*adj%)>>7:y2%=(dx%*adj%)>>7:xsum%+=(x2%*cx%(a%))/d2%:ysum%+=(y2%*cy%(a%))/d2%
a%=centre%+1
a%:d%=
(xsum%^2+ysum%^2):tx%=d%*band
256:
col%,(tx%<<8)+(tx%<<16)+(tx%<<24),,,&100:
x%,y%,over%-4:
x%,y%
cycle:
cycle
/7.6
15:r%=16*
(t%/9+60)+18:g%=16*
(t%/8)+18:b%=15*
(t%/7+120)+18:
a%=0
(a%+n%)
16,a%*r%,a%*g%,a%*b%:
(15-a%+n%)
16,a%*r%,a%*g%,a%*b%: