home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User 4
/
AUCD4.iso
/
acornuser
/
1998
/
apr1998
/
regulars
/
StarInfo
/
Stoner
/
Water
(
.txt
)
< prev
Wrap
RISC OS BBC BASIC V Source
|
1997-08-18
|
2KB
|
80 lines
True Plasma Drawer
by Nigel Stoner 1997
setpal
fullscrn
crosscrn
"OS_SWINumberFromString",,"ColourTrans_SetGCOL"
col%
doit:
" in line ";
cx%(16),cy%(16),pal%(255)
pickcs
calculate attractors
a%=0
centre%:cx%(a%)=
(1280):cy%(a%)=
(1280):
setpal
set pallette
COLOR a%,a%*(8*SINRAD(TIME)+8) ? for random colors ?
a%=0
a%,a%*16,a%*16,a%*16::
set sin pallette
a%=0
!!pal%(a%)=127*
(a%*1.411)+128
fullscrn
&Ccentre%=3:band=
(1)*.5+.1:
(band*100)):over%=8:start%=0
pickcs
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%:
x%,y%
crosscrn
centre%=3:over%=8:start%=0
pickcs
y%= start%
1024-over%
over%/2:
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:
69,x%,y%
x%:start%=start%
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%: