' Draws two sets of concentric circles. ' Spacing, colour and linewidth different each time. ' Result shows how superposed wavefronts 'interfere'. ' But basically eye candy- a programming exercise, nomainwin WindowWidth = 900 WindowHeight = 700 UpperLeftX = 50 UpperLeftY = 50 graphicbox #john.g1, 10, 10, 880, 680 button #john.b1, "Draw", [drawThem], UL, 400, 20 button #john.b2, "Quit", [quit], UL, 400, 60 open "R-theta coordinates-- Interference patterns & Moire patterns" for window as #john #john, "trapclose [quit]" wait [drawThem] wby2 =int( 90 *rnd(1))+10 ' move centres left and right to sep'n of w sze =int( 6 *rnd(1))+1 ' this will be the width of line #john.g1, "goto "; 450 -wby2; " 340 ; down ; fill white ; size "; sze #john.g1, "color "; int( 256*rnd(1)); " "; int( 256*rnd(1)); " ";int( 256*rnd(1)) for circle =1 to 60 #john.g1, "circle "; circle *10 scan next circle #john.g1, "up ; goto "; 450 +wby2; " 340 ; down" for circle =1 to 60 #john.g1, "circle "; circle *10 scan next circle wait [quit] close #john end