(*^ ::[ Information = "This is a Mathematica Notebook file. It contains ASCII text, and can be transferred by email, ftp, or other text-file transfer utility. It should be read or edited using a copy of Mathematica or MathReader. If you received this as email, use your mail application or copy/paste to save everything from the line containing (*^ down to the line containing ^*) into a plain text file. On some systems you may have to give the file a name ending with ".ma" to allow Mathematica to recognize it as a Notebook. The line below identifies what version of Mathematica created this file, but it can be opened using any other version as well."; FrontEndVersion = "Macintosh Mathematica Notebook Front End Version 2.2"; MacintoshStandardFontEncoding; fontset = title, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L3, e8, 24, "New York"; fontset = subtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L2, e6, 18, "New York"; fontset = subsubtitle, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeTitle, center, M7, bold, L2, e6, 14, "New York"; fontset = section, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, grayBox, M22, bold, L2, a20, 14, "New York"; fontset = subsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, blackBox, M19, bold, L2, a15, 12, "New York"; fontset = subsubsection, inactive, noPageBreakBelow, nohscroll, preserveAspect, groupLikeSection, whiteBox, M18, bold, L2, a12, 10, "New York"; fontset = text, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; fontset = smalltext, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 10, "New York"; fontset = input, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeInput, M42, N23, bold, L2, 12, "Courier"; fontset = output, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; fontset = message, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, R65535, L2, 12, "Courier"; fontset = print, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; fontset = info, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeOutput, M42, N23, L2, 12, "Courier"; fontset = postscript, PostScript, formatAsPostScript, output, inactive, noPageBreakInGroup, nowordwrap, preserveAspect, groupLikeGraphics, M7, l34, w282, h287, L2, 12, "Courier"; fontset = name, inactive, nowordwrap, nohscroll, noKeepOnOnePage, preserveAspect, M7, italic, B65535, L2, 10, "Geneva"; fontset = header, inactive, noKeepOnOnePage, preserveAspect, M7, L2, 10, "Times"; fontset = leftheader, inactive, L2, 10, "Times"; fontset = footer, inactive, noKeepOnOnePage, preserveAspect, center, M7, L2, 12, "Times"; fontset = leftfooter, inactive, center, L2, 12, "Times"; fontset = help, inactive, nohscroll, noKeepOnOnePage, preserveAspect, M7, L2, 10, "Geneva"; fontset = clipboard, inactive, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; fontset = completions, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; fontset = special1, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; fontset = special2, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, center, M7, L2, 12, "New York"; fontset = special3, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, right, M7, L2, 12, "New York"; fontset = special4, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; fontset = special5, inactive, nowordwrap, noKeepOnOnePage, preserveAspect, M7, L2, 12, "New York"; paletteColors = 128; currentKernel; ] :[font = input; preserveAspect] (* Set up the graphics *) :[font = input; dontPreserveAspect] lightclock[length_,width_,box_,xstart_,ystart_]:= Graphics[ { RGBColor[0,0,1], Rectangle[ {xstart,ystart}, {xstart+width,ystart+box} ], Rectangle[ {xstart,ystart+length-box}, {xstart+width,ystart+length} ], Line[{ {xstart,ystart+box}, {xstart,ystart+length-box} }], Line[{ {xstart+width,ystart+box}, {xstart+width,ystart+length-box} }] }] :[font = input; dontPreserveAspect; startGroup] frame[xstart_,ystart_,xend_,yend_]:= Graphics[{ GrayLevel[1], Point[{xstart,ystart}], Point[{xend,yend}] }] :[font = message; inactive; preserveAspect; endGroup] General::spell1: Possible spelling error: new symbol name "frame" is similar to existing symbol "Frame". :[font = input; dontPreserveAspect] pulse[x_,y_]:= Graphics[{ RGBColor[0.75,0.75,0], PointSize[0.025], Point[{x,y}] }] :[font = input; dontPreserveAspect] track[x_,y_]:= Graphics[ {GrayLevel[0.5], PointSize[0.01], Point[{x,y}] }] :[font = input; dontPreserveAspect] (* Stationary Light Clock Animation *) npics=40; npics2=npics/2; tl={}; Do[ If[ t<=npics2, y=0.15+ t 0.7/npics2, y= 0.85 -(t-npics2) 0.7/npics2 ]; Show[ frame[0,0,1,1], lightclock[ 1,.1,.1,0.5,0], pulse[0.55,y], tl, PlotRange->All ] ; tl=AppendTo[ tl, track[0.55,y] ], {t,0,npics,1} ] :[font = input; dontPreserveAspect] (* Moving Light Clock Animation: 1 tick per screen *) npics=40; npics2=npics/2; tl={}; Do[ x= 0.9 t/npics; If[ t<=npics2, y=0.15+ t 0.7/npics2, y= 0.85 -(t-npics2) 0.7/npics2 ]; Show[ frame[0,0,1,1], lightclock[ 1,.1,.1,x,0], pulse[x+0.05,y], tl, PlotRange->All ] ; tl=AppendTo[ tl, track[x+0.05,y] ], {t,0,npics,1} ] :[font = input; dontPreserveAspect] (* Setup graphic of chain of stationary clocks *) clockchain[length_,width_,box_]:= Graphics[ { RGBColor[0,0,1], Rectangle[ {0.05,0.},{0.05+width,box} ], Rectangle[ {0.05,length-box},{0.05+width,length} ], RGBColor[0,0,1], Line[{ {0.05,box},{0.05,length-box} }], Line[{ {0.05+width,box},{0.05+width,length-box} }], RGBColor[0,0,1], Rectangle[ {0.05+2 width,0.},{0.05+3 width,box} ], Rectangle[ {0.05+2 width,length-box},{0.05+3 width,length} ], RGBColor[0,0,1], Line[{ {0.05+2 width,box},{0.05+2 width,length-box} }], Line[{ {0.05+3 width,box},{0.05+3 width,length-box} }], RGBColor[0,0,1], Rectangle[ {0.05+4 width,0.},{0.05+5 width,box} ], Rectangle[ {0.05+4 width,length-box},{0.05+5 width,length} ], RGBColor[0,0,1], Line[{ {0.05+4 width,box},{0.05+4 width,length-box} }], Line[{ {0.05+5 width,box},{0.05+5 width,length-box} }], RGBColor[0,0,1], Rectangle[ {0.05+6 width,0.},{0.05+7 width,box} ], Rectangle[ {0.05+6 width,length-box},{0.05+7 width,length} ], RGBColor[0,0,1], Line[{ {0.05+6 width,box},{0.05+6 width,length-box} }], Line[{ {0.05+7 width,box},{0.05+7 width,length-box} }], RGBColor[0,0,1], Rectangle[ {0.05+8 width,0.},{0.05+9 width,box} ], Rectangle[ {0.05+8 width,length-box},{0.05+9 width,length} ], RGBColor[0,0,1], Line[{ {0.05+8 width,box},{0.05+8 width,length-box} }], Line[{ {0.05+9 width,box},{0.05+9 width,length-box} }] }] :[font = input; dontPreserveAspect] (* light clocks animation: moving and stationary *) npics=40; npics2=npics/2; npics4=npics/4; npics34=3 npics/4; tl={}; cchain=clockchain[0.45,0.1,0.1]; Do[ x= 0.9 t/npics; If[ t<=npics2, y=0.675+ t 0.2/npics2, y= 0.875 -(t-npics2) 0.2/npics2 ]; If[ t<=npics4, ys=0.125+ t 0.2/npics4, If[ t<=npics2, ys=0.325-(t-npics4) 0.2/npics4, If[ t<=npics34, ys=0.125 +(t-npics2) 0.2/npics4, ys=0.325-(t-npics34) 0.2/npics4 ] ] ]; Show[ frame[0,0,1,1], lightclock[ 0.45,.1,.1,x,0.55], pulse[x+0.05,y], tl, cchain, pulse[0.1,ys], pulse[0.3,ys],pulse[0.5,ys], pulse[0.7,ys],pulse[0.9,ys], PlotRange->All ] ; tl=AppendTo[ tl, track[x+0.05,y] ], {t,0,npics,1} ] ^*)