RGB Plasma Demo
Posted: Wed Jan 28, 2015 8:51 pm
rem RGB Plasma Demo
rem I was bored. Enjoy!
graphics
res=10 'Change this variable for quality
pi=3.1415
sw=screen_width()
sh=screen_height()
for a=1 to 2
b=0
for x=0 to sw step 20
for y=0 to sh step 20
fill color b/255,(y/5)/255,((x+y)/12)/255
fill rect x,y to x+19,y+19
b=b+.05
next y
next x
'gray wall
fill color .25,.35,.45
fill rect 30,30 to sw-20,sh-20
'white outline
draw color 1,1,1
draw rect 28,28 to sw-20,sh-20
'title
draw color 1,1,1
draw text "RGB PLASMA DEMO" at 0,0
draw color .255,.155,.155
draw text "RGB PLASMA DEMO" at 1,1
draw color .155,.55,.55
draw text "RGB PLASMA DEMO" at 2,2
draw color .55,0,0
draw text "RGB PLASMA DEMO" at 3,3
next a
dim cs(7201)
for a=1 to 7200
c=190+160*sin(a*pi/180)
cs(a)=c
next a
loop:
refresh off
gosub plasma
refresh on
goto loop
'Draw The Plasma Display
plasma:
'Color Table Offsets
mm=mm+.01
q=30+30*sin(mm)
rs=int(360+350*sin(mm))
gs=int(720+710*cos(mm))
bs=int(1440+1430*cos(mm/3))
'Draw The Rectangles
for x=40 to sw-40 step res
cn=cn+1
w=q+q*sin(x*.01)
for y=49 to sh-40 step res
fill color cs(y+rs+w)/255,cs(x+gs+w)/255,cs(bs+x+y+w)/255
fill rect x,y to x+res,y+res
next y
next x
return
rem I was bored. Enjoy!
graphics
res=10 'Change this variable for quality
pi=3.1415
sw=screen_width()
sh=screen_height()
for a=1 to 2
b=0
for x=0 to sw step 20
for y=0 to sh step 20
fill color b/255,(y/5)/255,((x+y)/12)/255
fill rect x,y to x+19,y+19
b=b+.05
next y
next x
'gray wall
fill color .25,.35,.45
fill rect 30,30 to sw-20,sh-20
'white outline
draw color 1,1,1
draw rect 28,28 to sw-20,sh-20
'title
draw color 1,1,1
draw text "RGB PLASMA DEMO" at 0,0
draw color .255,.155,.155
draw text "RGB PLASMA DEMO" at 1,1
draw color .155,.55,.55
draw text "RGB PLASMA DEMO" at 2,2
draw color .55,0,0
draw text "RGB PLASMA DEMO" at 3,3
next a
dim cs(7201)
for a=1 to 7200
c=190+160*sin(a*pi/180)
cs(a)=c
next a
loop:
refresh off
gosub plasma
refresh on
goto loop
'Draw The Plasma Display
plasma:
'Color Table Offsets
mm=mm+.01
q=30+30*sin(mm)
rs=int(360+350*sin(mm))
gs=int(720+710*cos(mm))
bs=int(1440+1430*cos(mm/3))
'Draw The Rectangles
for x=40 to sw-40 step res
cn=cn+1
w=q+q*sin(x*.01)
for y=49 to sh-40 step res
fill color cs(y+rs+w)/255,cs(x+gs+w)/255,cs(bs+x+y+w)/255
fill rect x,y to x+res,y+res
next y
next x
return