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

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


ClsColor 64,0,0
FlipBuffer

'

sub PsychoSine(single m,n,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))
    c and= 0xffffff
    pixel x,scr-y,c
    i=i*m+n
    fy+=st
  next
  fx+=st
next
end sub

int i
single m,n,st


m=1.00  'scaler
n=0     'offset
st=.05  'cos step
for i=0 to 80
  PsychoSine m, n, st
  n+=5 '10 '111
  FlipBuffer
  if key(27) then jmp fwd done
next


m=1.00  'scaler
n=0     'offset
st=.2 'cos step
for i=0 to 80
  PsychoSine m, n, st
  n+=5 '10 '111
  FlipBuffer
  if key(27) then jmp fwd done
next


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


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


pause
done:
