|
Post by David Drake on Mar 5, 2020 11:44:49 GMT -5
This is based on a Rosetta Code task, but I don't intend to post it. However, you ought to run the code. The coding isn't pretty, but the visual effect is.
nomainwin UpperLeftX=1:UpperLeftY=1 WindowWidth=DisplayWidth:WindowHeight=DisplayHeight open "Ployspiral" for graphics_nf_nsb as #1 #1 "trapclose [q];down;fill black;flush;size 5;"
timer 100, [animate]
wait
[animate] while a < 4100 rd=int(rnd(1)*255):bl=int(rnd(1)*255):gn=int(rnd(1)*255) a=a+1 b=b+1:if b=100 then b=0: #1 "discard;cls;fill black" incr = (incr + 0.009) mod 360 x1 = DisplayWidth/2 y1 = DisplayHeight/2 length = 4 angle = incr i=0 while i<100 i=i+1 x2 = x1 + cos(angle) * length y2 = y1 + sin(angle) * length rd=rd+1:if rd>254 then rd=1 bu=bu+3:if bu>254 then bu=1 gn=gn+5:if gn>254 then gn=1 #1 "color ";rd;" ";bu;" ";gn;";line ";x1;" ";y1;" ";x2;" ";y2 #1 "backcolor black;place ";WindowWidth-100;" 40;color white;\Angle: ";int(maxangle) #1 "backcolor black;place ";WindowWidth-100;" 60;color white;\Count: ";a x1=x2:y1=y2 length = length+3 angle = (angle + incr) mod 360 if angle > maxangle then maxangle=angle:if maxangle>350 then maxangle=0 scan wend if a>4000 then a=0:incr=0:maxangle=0:i=0:angle=0:x1=0:x2=0:y1=0:y2=0:#1 "fill black" wait wend wait
[q] close #1 end
|
|
|
Post by tenochtitlanuk on Mar 5, 2020 13:29:20 GMT -5
You clearly think like me- when I put this up on the old Forum and my website I commented 'One of those graphic exercises just crying out for clever colour effects.. '
|
|
|
Post by sarossell on Mar 5, 2020 16:05:48 GMT -5
Whooo! I can't feel my eyebrows. Reminds me of some of my less intelligent life choices in college. %@/
|
|