| keep staring at the middle of the screen. hypnotic ...
 
 
 ' trippy color-cycling thing
' jb
Strict
framework brl.glmax2d
Import brl.linkedlist
Import brl.random
Const SW=640 , SH=480
Const ASP=(SW-SH)/2
Const NUMOVALS=34 , STEPSIZE=12
Type rgbtype
 Field  red,green,blue
End Type
Global list:TList=CreateList()
For Local d=1 To NUMOVALS
	Local c:rgbtype=New rgbtype
	ListAddLast list,c
Next
SeedRnd MilliSecs()
Global radd=Rand(1,5)
Global gadd=Rand(1,5)
Global badd=Rand(1,5)
Global nred,ngreen,nblue
Graphics SW,SH
HideMouse
While Not KeyHit(KEY_ESCAPE)
	If Rand(100)>80
		radd=Rand(-14,14) ; gadd=Rand(-14,14) ; badd=Rand(-14,14)
	endif
	Local c:rgbtype=rgbtype(list.Last())
	If nred+radd<0 Or nred+radd>255 radd=-radd
	If ngreen+gadd<0 Or ngreen+gadd>255 gadd=-gadd
	If nblue+badd<0 Or nblue+badd>255 badd=-badd
	nred:+radd ; ngreen:+gadd ; nblue:+badd
	list.RemoveFirst()
	c=New rgbtype
	ListAddLast list,c
	c.red=nred ; c.green=ngreen ; c.blue=nblue
	Cls
	Local s=-80
	For c=EachIn list
		SetColor c.red,c.green,c.blue
		DrawOval s,s-ASP+2,SW-s-s,SW-s-s-4
		s=s+STEPSIZE
	Next
	Flip
	FlushMem
Wend
End 
 
 |