sorry, only maxgui here atm :P Tho it's only for the actual displaying.. and it was rushed a bit, I did better ones in the past ^_^
Strict
' CS_TBL
Local window:TGadget=CreateWindow("plasma",200,100,400,300)
Local canvas:TGadget=CreateCanvas(0,0,256,192,window)
Local timer:TTimer=CreateTimer(30)
Local f1:Int
Local f2:Int
Local f3:Int
Local x:Int
Local y:Int
Local r:Int
Local g:Int
Local b:Int
Local m1:Float
Local m2:Float
Repeat
WaitEvent()
If EventID()=EVENT_WINDOWCLOSE End
If EventID()=EVENT_TIMERTICK
SetGraphics CanvasGraphics(canvas)
Cls
f1:+2
f2:+3
f3:-4
For y=0 To 191 Step 8
For x=0 To 255 Step 2
m1=Cos(f1+y)*128
m2=Cos(f2+x)*128
r=Sin(f1-x+y/4+m1)*127+128
g=Sin(f2+y/2-x/4+m2)*127+128
b=Sin(f3+x+y-m1/4)*127+128
r=Limit(r,0,255)
g=Limit(g,0,255)
b=Limit(b,0,255)
SetColor r,g,b
DrawRect x,y,1,8
r=Sin(f2+x+y/7+m1)*127+128
g=Sin(f3-y/2-x/6-m2)*127+128
b=Sin(-f1+x-y+m1/4)*127+128
r=Limit(r,0,255)
g=Limit(g,0,255)
b=Limit(b,0,255)
SetColor r,g,b
DrawRect x+1,y,1,8
Next
Next
Flip
EndIf
Forever
Function Limit:Int(v:Int,lo:Int,hi:Int)
If v<lo Return lo
If v>hi Return hi
Return v
End Function