|
Post by B+ on Feb 9, 2019 18:42:58 GMT
' B+ inspired by Vibrating Rectangles (RC) at Liberty Forum 2019-02-09
global pi, XMAX, YMAX pi = acs(-1) XMAX = 1000 YMAX = 700
nomainwin WindowWidth = XMAX + 8 WindowHeight = YMAX + 32 UpperLeftX = 200 UpperLeftY = 20 cx = XMAX /2 cy=YMAX /2
open "Vibrating Rectangle" for graphics_nsb as #1 #1 "down ;size 6; fill black" #1 "trapclose quit" r = rnd(0) * 255 g = rnd(0) * 255 b = rnd(0) * 255 sx = 20 sy = 14 h = 5 da = 6 * pi / 24
while 1 scan m = m + 1 if m > 24 then m = 0 r = (r + rnd(0)*25) mod 255 g = (g + rnd(0)*25) mod 255 b = (b + rnd(0)*25) mod 255 end if an = an + da savean = an for n = 0 to 23 a = an + n * da f = (n + m) / 24 if f > 1 then f = f - 1 #1 "color ";(r * f);" ";(g * f);" ";(b * f) #1 "place ";cx - n * sx + h * cos(a);" ";cy - n * sy + h * sin(a) #1 "box ";cx + n * sx + h * cos(a);" ";cy + n * sy + h * sin(a) next call pause 60 an = savean #1 "color black" for n = 0 to 23 a = an + n * da #1 "place ";cx - n * sx + h * cos(a);" ";cy - n * sy + h * sin(a) #1 "box ";cx + n * sx + h * cos(a);" ";cy + n * sy + h * sin(a) next wend wait
sub quit H$ close #1 end end sub
sub pause mil 'tsh version has scan built-in t0 = time$("ms") while time$("ms") < t0 + mil : scan : wend end sub
|
|
|
Post by tenochtitlanuk on Feb 9, 2019 20:40:08 GMT
I like the circling effect. Fun project for anyone!
|
|
|
Post by tsh73 on Feb 10, 2019 10:59:16 GMT
Wow. Mesmerizing.
|
|