I don't know what you would use it for, but anyway this code will make rain fall and do some weird circle movement stuff on a 30x30 matrix. Oh, the camera moves using cosine and sine as well.
rem setup
Sync On
Sync Rate 0
Backdrop on
Autocam off
Dim centres(5,2)
rem load matrix image
Ink rgb(255,0,0),0 : box 0,0,32,32
Ink rgb(0,255,0),0 : box 32,0,64,32
Get image 1,0,0,64,32
rem prepare circle centre information
centres(1,0)=rnd(30) : centres(1,1)=rnd(30) : centres(1,2)=rnd(359)
centres(2,0)=rnd(30) : centres(2,1)=rnd(30) : centres(2,2)=rnd(359)
centres(3,0)=rnd(30) : centres(3,1)=rnd(30) : centres(3,2)=rnd(359)
centres(4,0)=rnd(30) : centres(4,1)=rnd(30) : centres(4,2)=rnd(359)
centres(5,0)=rnd(30) : centres(5,1)=rnd(30) : centres(5,2)=rnd(359)
rem prepare matrix
Make matrix 1,1000,1000,30,30
Randomize matrix 1,50
Prepare matrix texture 1,1,2,1
Update matrix 1
rem prepare rain fx
For n=1 to 600
Make object plain n,1,3
Color object n,rgb(0,200,255)
Position object n,rnd(1000),rnd(400),rnd(1000)
Next n
rem prepare camera
Position camera 500,100,-100
Set camera fov 100
Rotate camera 5,0,0
rem main loop
Do
rem update rain fx
For n=1 to 600
Position object n,object position x(n),object position y(n)-3,object position z(n)
If object position y(n)<-5 then position object n,rnd(1000),400,rnd(1000)
Next n
rem increase number controlling the rotation around a centre used for setting matrix heights
For n=1 to 5
centres(n,2)=centres(n,2)+n
Next n
rem update matrix heights
For x=0 to 30
For z=0 to 30
For n=1 to 3
For o=1 to 5
If centres(o,0)+(cos(centres(o,2))*(10+n))=>x-2 and centres(o,0)+(cos(centres(o,2))*(10+n))=<x+2 and centres(o,1)+(sin(centres(o,2))*(10+n))=>z-2 and centres(o,1)+(sin(centres(o,2))*(10+n))=<z+2
Set matrix height 1,x,z,40
Else
If get matrix height(1,x,z)>0 then Set matrix height 1,x,z,get matrix height(1,x,z)-1
Endif
Next o
Next n
Next z
Next x
Update matrix 1
rem update matrix tiles
For x=0 to 29
For z=0 to 29
If get matrix height(1,x,z)>30 then set matrix tile 1,x,z,2 else set matrix tile 1,x,z,1
Next z
Next x
rem move camera
b#=wrapvalue(b#+1)
c#=wrapvalue(c#+2.5)
Position camera 495+(cos(c#)*20),160+(cos(b#)*120),-10+(cos(b#)*140)
Rotate camera 20+(cos(b#)*40),0,0
rem end loop
Sync
Loop
I am paranoid. No more can I say.