sync on
sync rate 60
sync
 
make2images()
 
do
  lines(1,2)
  wait key
  lines2(2,1)
  wait key
loop
 
 
function lines(img1,img2)
 
paste image img2,0,0
hi#=screen height()
hi#=hi#/100
 
 
for i=1 to 100
   get image i+1000,0,hi#*(i-1),screen width(),hi#*i
next i
 
paste image img1,0,0
 
for i=100 to 1 step -1
   sprite i,0,hi#*(i-1),i+1000
   sync
next i
 
for i=1 to 100
   delete sprite i
next i
 
paste image img2,0,0
sync
 
endfunction
 
function lines2(img1,img2)
 
paste image img2,0,0
hi#=screen height()
hi#=hi#/100
 
 
for i=1 to 100
   get image i+1000,0,hi#*(i-1),screen width(),hi#*i
next i
 
paste image img1,0,0
 
for i=100 to 50 step -1
   paste image i+1000,0,hi#*(i-1)
   sync
   j=101-i
   paste image j+1000,0,hi#*(j-1)
   sync
next i
 
for y=1 to 49
   for i=50-y to 50+y
      paste image i+1000,0,hi#*(i-1)
   next i
   sync
next y
 
paste image img2,0,0
sync
 
endfunction
 
function make2images()
 
autocam off
color backdrop 0
position camera 0,0,0
for image=1 to 2
for n=1 to 500
if image=1 then make object box n,rnd(10)+1,rnd(10)+1,rnd(10)+1
if image=2 then make object sphere n,rnd(7)+1,20,20
color object n,rnd(1000000000)
position object n,rnd(100)-50,rnd(100)-50,rnd(100)+50
next n
sync
get image image,0,0,screen width(),screen height(),1
delete objects 1,500
next image
 
endfunction