#compact
include "..\GDIWindow\window.inc"

sys scr=800
Window "Ray6" ,scr,scr,2
sys_mode=4


ClsColor 32,0,0
FlipBuffer


sub PsychoSine(single im,ii,st)
'==============================
single fx,fy,i
sys r,g,b,c,x,y
for x=0 to <scr
i=1 '6
fy=0
for y=0 to <scr
c=i*(1+cos(fx))+i*(1+cos(fy))
pixel x,scr-y,c
i=i*im+ii
fy+=st
next
fx+=st
next
end sub

int i
single m,n

m=1.00
n=1
for i=1 to 80
PsychoSine m, n, .01
n+=111
FlipBuffer
if key(27) then jmp fwd done
next

m=1.0100
n=.4
for i=1 to 40
PsychoSine m, n, .03
m+=.0005 
FlipBuffer
if key(27) then jmp fwd done
next



pause
done:
