sync on
 
type pix
 
    xpo as float
    ypo as float
    xmo as float
    ymo as float
    col as dword
 
endtype
 
global w
global h
 
 
make2images()
save image "Bit12.bmp",1
save image "Bit22.bmp",2
 
load bitmap "Bit12.bmp",1
load bitmap "Bit22.bmp",2
 
 
 
set current bitmap 0
 
copy bitmap 1,0
 
make memblock from bitmap 1,1
 
global dim pixels(screen width(),screen height()) as pix
 
get_pixels()
 
do
 
    move_pixels()
    sync
 
loop
 
function get_pixels()
 
    w = screen width()
    h = screen height()
    hw = w/2
    hh = h/2
 
    for y = 0 to h-1
        for x = 0 to w-1
            p = (((y*w)+x)*4)+12
            pixels(x,y).xpo = x
            pixels(x,y).ypo = y
            pixels(x,y).xmo = (x-hw)*0.04
            pixels(x,y).ymo = (((y-hh)*0.01)-2.0)+(((x-hw)*0.008)^2)
            pixels(x,y).col = rgb(memblock byte(1,p+2),memblock byte(1,p+1),memblock byte(1,p))
        next x
    next y
 
endfunction
 
function move_pixels()
 
    copy bitmap 2,0
`    cls 0
    lock pixels
 
    for y = 0 to h
        for x = 0 to w
            inc pixels(x,y).xpo,pixels(x,y).xmo
            inc pixels(x,y).ypo,pixels(x,y).ymo
            inc pixels(x,y).ymo,0.5
            pixels(x,y).col = rgb(maxm(rgbr(pixels(x,y).col)+5),maxm(rgbg(pixels(x,y).col)+5),rgbb(pixels(x,y).col))
            dot pixels(x,y).xpo,pixels(x,y).ypo,pixels(x,y).col
        next x
    next y
 
    unlock pixels
 
endfunction
 
function maxm(value)
 
    if value > 255 then value = 255
 
endfunction value
 
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