setrgb 1,0,0,60
open window 640,512
label k
 setdispbuf bu:bu=1-bu:setdrawbuf bu
 for y=0 to 512 step 5
  m=m+1
  x=(cos(m/17)+cos(m/16.5)+sin(m/8.5))*100+320
  setrgb 2,0,0,0
  setrgb 3,x/2,0,y/2
  gtriangle 0,y to 0,y+5 to x,y
  gtriangle 640,y to 640,y+5 to x,y
  setrgb 2,x/2,0,y/2
  gtriangle 0,y+5 to x,y+5 to x,y
  gtriangle 640,y+5 to x,y+5 to x,y
 next y
goto k

