|
Post by tsh73 on Feb 23, 2024 5:22:32 GMT -5
Leave it running for a minute or two to see all variations nomainwin global QuitRequested
open "color circles" for graphics_nsb_nf as #gr #gr "home; down; posxy cx cy" #gr "trapclose [quit]"
N=40 'looks OK for my (slow) machine. Try to change pi=acs(-1) #gr "color white" #gr "backcolor red" sign=-1 'unwind while 1 if rnd(0)<0.01 then rChange =1-rChange if rnd(0)<0.01 then sign =-1*sign for i = 1 to N SCAN a=3*2*pi*i/N r=i/N*cx*1.2 x=r*cos(a+a0) y=r*sin(a+a0) #gr "place ";cx+x;" ";cy+y #gr "backcolor ";rainbow$(((a+a0) mod pi) / pi) if rChange then #gr "circlefilled ";2+r/cx*10 else #gr "circlefilled ";10 end if next a0=a0+sign*3*2*pi/N call pause 30 if QuitRequested then [quit] #gr "cls" wend
wait
[quit] timer 0 close #gr end
sub pause mil 'now after pause you can check if QuitRequested t=time$("ms") while time$("ms")<t+mil scan wend exit sub [quit] QuitRequested=1 end sub
function rainbow$(x) hi = int((x*6) mod 6)+ 5*(x<0) 'fixed to 0..5 f = (x*6) mod 1 + (x<0) 'frac, 0..1 q = (1-f) select case hi case 0 r = 1: g = f: b = 0 case 1 r = q: g = 1: b = 0 case 2 r = 0: g = 1: b = f case 3 r = 0: g = q: b = 1 case 4 r = f: g = 0: b = 1 case 5 r = 1: g = 0: b = q end select R = int(r*255) G = int(g*255) B = int(b*255) rainbow$= R;" ";G;" ";B end function
|
|
honky
Junior Member
Posts: 63
|
Post by honky on Feb 23, 2024 8:29:37 GMT -5
It is the expansion of the universe and its big crunch. It's pretty
|
|