SPL does very fast graphics rendering. I look forward to seeing it developed further.
Code: Select all
''
Circle Dance Screensaver
by rbytes
My first SPL program
based on circles.txt by Dav
in Smart Basic examples
August 2017
''
mx,my = #.scrsize()
mr = #.min(mx,my)/7
ms = #.max(mx,my)/100
x=mx/2
y=my/2
r=#.RND(255)
g=#.RND(255)
b=#.RND(255)
z=1
x=mx/2
y=my/2
t=.0001
#.scrclear(0,0,0)
:main
> i, 1..200
x1=#.cos(i)*z +x
y1=#.sin(i)*z +y
#.drawsize(#.rnd(ms))
#.drawcolor (r/255,g/255,b/255)
' #.drawcolor(#.rnd(1),#.rnd(1),#.rnd(1))
#.drawcircle(x1,y1,#.rnd(mr))
z=z+1 ; ? z > x, z = 1
r=r+1 ; ? r> 255, r=#.RND(255)
g=g+1 ; ? g> 255, g=#.RND(255)
b=b+1 ; ? b> 255, b=#.RND(255)
' ? #.scrwidth()<>x*2, main ->
#.delay(t)
<
main ->