Yep.

I've added a couple of lines so you can see something happening while you wait:

set display mode 1024,768,32
width=screen width()
height=screen height()
midy=height/2
midx=width/2
sync on : sync rate 60
set text size 50
cls rgb(0, 128, 0) ` added so we can see something happening :)
num=4
dim xx(num)
dim yy(num)
dim xf(num)
dim yf(num)
dim xff(num)
dim yff(num)
dim xss(num)
dim yss(num)
for f=0 to num
xx(f)=rnd(width):yy(f)=rnd(height)
g=2+rnd(3):xff(f)=g
if rnd(100)>50 then g=-g
h=2+rnd(3):yff(f)=h
if rnd(100)>50 then h=-h
xf(f)=g:yf(f)=h
next f
randomize timer()
dim col(15)
col(0)=rgb(200,0,0):col(1)=rgb(0,200,0):col(2)=200:col(3)=rgb(0,200,200):col(4)=rgb(180,0,230)
col(5)=rgb(200,170,0):col(6)=rgb(150,200,0):col(7)=rgb(80,80,80)
col(8)=rgb(250,250,250):col(9)=rgb(255,200,0):col(10)=rgb(120,120,120)
col(11)=rgb(0,100,200):col(12)=rgb(120,0,255)
col(13)=rgb(255,100,0):col(14)=rgb(160,255,0):col(15)=rgb(0,250,0)
xx=rnd(width):yy=rnd(height)
xf=4:yf=4
`````````````````````````````````````
do
gosub meta
gosub bounce
`ink rgb(200,200,200)
`text 0,20,str$(dist#)
`text 0,55,str$(sum#)
sync
`gosub saver
loop
``````````````````````````````````````
meta:
null = make vector3(2)
for y=0 to height
`yy=y*width
for x=0 to width
`null = make vector3(2)
sum#=0
sumr#=0
sumg#=0
`dist#=0
for f=0 to num
set vector3 2,x-xx(f),y-yy(f),0
dist#=length vector3(2)
sum#=sum#+65*xss(f)/dist#
sumr#=sumr#+55*yss(f)/dist#
sumg#=sumg#+35*(yss(f)-xss(f))/dist#
next f
sum#=60/sum#
sum#=sum#*2156900
sum#=sum# and 255
sumr#=30/sumr#
sumr#=sumr#*2132900
sumr#=sumr# and 255
sumg#=15/sumg#
sumg#=sumg#*2112900
sumg#=sumg# and 255
ink rgb(sum#,sumr#,sumg#)
box x,y,x+1,y+1
next x
sync ` added so we can see something happening :)
next y
return
``````````````````````````````````````
bounce:
for f=0 to num
xx(f)=xx(f)+xf(f)
if xx(f)>width-10 then xf(f)=-xff(f)
if xx(f)<4 then xf(f)=xff(f)
yy(f)=yy(f)+yf(f)
if yy(f)>height-10 then yf(f)=-yff(f)
if yy(f)<4 then yf(f)=yff(f)
xss(f)=midx+xx(f)*sin(xx(f))
yss(f)=midy+yy(f)*cos(yy(f))
`ink rgb(250,250,250)
`box xx(f),yy(f),xx(f)+10,yy(f)+10
next f
return
``````````````````````````````````````
saver:
sv$="00000"
inc fra:sv1$=str$(fra):sv$=sv$+sv1$
sv$=right$(sv$,5)
fil$="e:\frames4\":fil$=fil$+sv$+".jpg"
get image 4000,0,0,1920,1080,1
save image fil$,4000
if fra>9000 then end
return
````````````````````
loader:
a$="00000":a$=a$+str$(fram):a$=right$(a$,4)
b$="e:\frames3\"+a$+".bmp"
load image b$,2,1
if fram<2904 then inc fram
if frame=2904 then end
return