setrgb 3,0,0,0
open window 640,512
label k
 setdispbuf bu:bu=1-bu:setdrawbuf bu
 for x=0 to 640 step 5
  m=m+1
  y=cos(m/20.5)*cos(m/21.5)*cos(m/21.2)*52+256
  j=cos(m/22)*y/5+184
  setrgb 1,(x+y)/4,0,y/3
  setrgb 2,x/2,y/3,y
  gtriangle x,y-32 to x,y to x+5,y-32
  gtriangle x+5,y to x,y to x+5,y-32
  gtriangle x,y+j to x,y to x+5,y+j
  gtriangle x+5,y to x,y to x+5,y+j
  setrgb 2,0,0,ran(255)-x
  gtriangle x,y-32 to x,0 to x+5,y-32
  gtriangle x+5,0 to x,0 to x+5,y-32
  gtriangle x,y+j to x,512 to x+5,y+j
  gtriangle x+5,512 to x,512 to x+5,y+j
 next x
goto k
