Most of the parameters are randomly chosen but some are tunable by hand within the source code.
Code: Select all
dim as integer ptr scrp,framep
dim as integer x,y,z,zz,h,v,c,x2,y2,f1,f2,f3
dim as integer x3,y3,xt,yt
dim as integer xx,xy,yx,yy,xx2,xy2,yx2,yy2
dim as integer xxx,yxx,xxy,xyy,yxy,yyy
dim as integer xxxt,yxxt,xxyt,xyyt,yxyt,yyyt
f3=2
f2=0
f1=9
screen 18,32
dim shared framebuf(0 to 479,0 to 639) as integer
randomize
do
for zz=1 to 4
xxxt=int(rnd*128)-64
yxxt=int(rnd*128)-64
xxyt=int(rnd*128)-64
xyyt=int(rnd*128)-64
yxyt=int(rnd*128)-64
yyyt=int(rnd*128)-64
xt=int(rnd*16)-8
yt=int(rnd*16)-8
for z=1 to 64
if inkey$="q" then end
x=0:y=0
xx=256:xy=0:yx=0:yy=256
for v=0 to 239
x2=x:y2=y
xx2=xx:yx2=yx
for h=0 to 255
c=(((y2+y3) and 65280) shl 8)+(((x2+x3) shr 8) and 255)
' to clip or not to clip?? ;)
'if y2<0 then c=0
if y2>65535 then c=0
'if x2<0 then c=0
if x2>65535 then c=0
framebuf(240+v,320+h)=c
framebuf(240+v,319-h)=c
framebuf(239-v,320+h)=c
framebuf(239-v,319-h)=c
x2+=(xx2 shr f1)
y2+=(yx2 shr f1)
xx2+=(xxx shr f2)
yx2+=(yxx shr f2)
next h
x+=(xy shr f1)
y+=(yy shr f1)
xx+=(xxy shr f2)
xy+=(xyy shr f2)
yx+=(yxy shr f2)
yy+=(yyy shr f2)
next v
' copy framebuffer to screen
scrp=screenptr:framep=@framebuf(0,0)
screenlock
for h=0 to 307199:*scrp=*framep:scrp+=1:framep+=1:next h
screenunlock
sleep 16
xxx+=xxxt
yxx+=yxxt
xxy+=xxyt
xyy+=xyyt
yxy+=yxyt
yyy+=yyyt
x3+=xt
y3+=yt
next z
next zz
xxx=(xxx shr f3)
yxx=(yxx shr f3)
xxy=(xxy shr f3)
xyy=(xyy shr f3)
yxy=(yxy shr f3)
yyy=(yyy shr f3)
loop