Heya everyone

Very long time no see !
Sorry for not being present all that time, I already explained the situation to shockwave so I won't tell all the story here but I just don't code as much as I would.
Anyway, here is a little snippet I coded yesterday, I thought it could interest some of you

Thanks to duke4e from freebasic forums, hellfire and Jim from well.. here

for the optimisation

A screenshot :
The code :
Screenres 320,240,32
Const ZOOM_FACTOR = .003
Type WaveT
As Single x,y
As Single Freq
End Type
#include "fbgfx.bi"
Const _reduct = 1/(255*255)
Const _255 = 1/255
Dim Shared As Single t
Dim Shared As WaveT Wave(2)
Dim Shared As Uinteger Pal(255)
Dim Shared As Any Ptr Back
Dim Shared As Uinteger Ptr buffer
Dim Shared As Integer Ptr pixel
buffer = Screenptr()
Wave(0).Freq = .052
Wave(1).Freq = .08
Wave(2).Freq = .086
Back = Imagecreate(320,240)
'From vdecampo post
pixel = back+SizeOf(FB.IMAGE) 'Skip over image header
Bload "blue_sunset.bmp",Back
Sub HandleWaves()
Static As Integer cR,cG,cB,ii,ii2,ii3,jj,rr,gg,bb
Static As Uinteger col,p
For i As Integer = 0 To 319
ii = (Wave(0).x-i)*(Wave(0).x-i)
ii2 = (Wave(1).x-i)*(Wave(1).x-i)
ii3 = (Wave(2).x-i)*(Wave(2).x-i)
For j As Integer = 0 To 239
jj = Wave(0).y-j
cR = 128+127*Cos(ZOOM_FACTOR*(ii + jj*jj)*Wave(0).Freq+t)
jj = Wave(1).y-j
cG = 128+127*Cos(ZOOM_FACTOR*(ii2 + jj*jj)*Wave(1).Freq+t)
jj = Wave(2).y-j
cB = 128+127*Cos(ZOOM_FACTOR*(ii3 + jj*jj)*Wave(2).Freq+t)
Cr = (Cr+Cg+Cb+(255-Cr)*.5)/3
'p = Point(Abs(i-Cr*.5),Abs(j-Cr*.5),Back)
'vdecampo
p = pixel[Cint(Abs(j-Cr*.5f)) * 320 + Cint(Abs(i-Cr*.5f))]
bb = Cr * (p And 255) * _255
gg = Cr * ((p Shr 8) And 255) * _255
rr = Cr * ((p Shr 16) And 255) * _255
buffer[i + 320 * j] = Rgb(rr,gg,bb)
Next
Next
End Sub
Do
Screenlock : Cls
Wave(0).x = 100-80*Cos(t*.1)
Wave(0).y = 180-120*Sin(t*.5)
Wave(1).x = 300+50*Cos(t*.4)
Wave(1).y = 200+40*Sin(t*.2)
Wave(2).x = 50+10*Cos(t*.3)
Wave(2).y = 60+130*Sin(t*.2)
HandleWaves()
t+=.1
Screenunlock : Sleep 1,1
Loop Until Multikey(&h01)
Imagedestroy(Back)
The background image :

(save as "blue_sunset.bmp" in the same folder as the source file. You can use any 320x240 bmp file

)