'LAVA Coded By Shockwave (C) 2002.
'(Code Snippet) Please Don't List As A Full Demo.
'
'
open window 640,512
points=50
dim x(points)
dim y(points)
yp=0
for a=1 to points
 x(a)=200
 y(a)=yp
 yp=yp+512/(points-1)
next a
setrgb 0,10,10,10
label loop
  setdrawbuf dw
  dw=1-dw
  setdispbuf dw
  setrgb 1,8,6,10
  setrgb 2,57,7,50
  setrgb 3,46,8,30
gtriangle 0,0 to 640,512 to 0,512
gtriangle 0,0 to 640,512 to 640,0

  gosub pols
goto loop

label pols
'transform
red=200+100*sin(ll/2)
blu=200+100*sin(ll/3)
grn=200+100*sin(ll/7)
for a=1 to points
x(a)=x(a)+2*sin(mm+a/4)
next a
mm=mm+.1
ll=ll+.11
s=5*sin(ll/3)
for a=1 to points
x(a)=x(a)+s*cos(ll+a/7)
next a
for a=1 to points-1
c=a*2
setrgb 1,0,0,0
setrgb 2,0,0,0
setrgb 3,red,grn,blu+c
 gtriangle x(a),y(a) to x(a+1),y(a+1) to 640,y(a)
 gtriangle x(a),y(a) to x(a+1),y(a+1) to 0,y(a)

setrgb 2,red,grn,blu+c
 gtriangle x(a+1),y(a+1) to 640,y(a+1) to 640,y(a)
 gtriangle x(a+1),y(a+1) to 0,y(a+1) to 0,y(a)

next a 
return


