File: KalRGB.kbs

package info (click to toggle)
basic256 2.0.99.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,888 kB
  • sloc: cpp: 17,185; yacc: 4,025; lex: 1,466; java: 1,091; sh: 39; xml: 33; makefile: 20
file content (24 lines) | stat: -rw-r--r-- 624 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
rem Kalidescope

cls
print "Press Q to stop."
clg
maxsize = 100

fastgraphics

while true
   x = int(rand * graphwidth)
   y = int(rand * graphheight)
   z = int(rand * maxsize)	# size of box to draw on screen
   color rgb(rand*256, rand*256, rand*256, rand*256) # random color and opacity
   rect x, y, z, z
   rect graphwidth - x - z, y, z, z		# draw mirror reflection on x axis
   rect x, graphheight - y - z, z, z		# draw mirror reflection on y axis
   rect graphwidth - x - z, graphheight - y - z, z, z	# draw mirror reflestion on both
   refresh
   if key = asc("Q") then end	# if user presses q then end
end while