Circle Dance Screensaver
Posted: Mon Aug 21, 2017 3:34 am
I spent most of the day waiting for my new CHUWI dual-boot tablet to install the latest version of Windows 10. I had to do that because when I went to get SPL from the Windows store, it would not download to my pre-installed Windows 10. I looked through the command set and decided that I would try to modify some existing code instead of starting from scratch.
SPL does very fast graphics rendering. I look forward to seeing it developed further.
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 ->