{VERSION 2 3 "IBM INTEL NT" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Text \+ Output" -1 2 1 {CSTYLE "" -1 -1 "Courier" 1 10 0 0 255 1 0 0 0 0 0 1 3 0 0 }1 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 0" -1 256 1 {CSTYLE "" -1 -1 "Helvetica" 1 12 128 0 128 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "R3 Font 2" -1 257 1 {CSTYLE "" -1 -1 "Courier" 1 11 0 128 128 1 2 1 2 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 0 "" 0 "" {TEXT -1 103 "Wave Packet Problem \+ RAYt race.mws" }}{PARA 0 "" 0 "" {TEXT -1 103 "2D Paraxial Ray Trace \+ ABW 7/ 21/95" }}{PARA 0 "" 0 "" {TEXT -1 81 "Learning objectives: Visualize p ropagation of multiple rays through simple system" }}{PARA 0 "" 0 "" {TEXT -1 80 " Physical intuition re garding image formation" }}{PARA 0 "" 0 "" {TEXT -1 37 " \+ " }}{PARA 0 "" 0 "" {TEXT -1 37 " \+ " }}{PARA 0 "" 0 "" {TEXT -1 62 "MAPLE: linalg[ matrix], evalm, &*, for..from..to..do..od, plot" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 45 "Procedure traces five ray s through two lenses" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 " " {TEXT -1 24 "Definition of Variables:" }}{PARA 0 "" 0 "" {TEXT -1 29 "x = position along optic axis" }}{PARA 0 "" 0 "" {TEXT -1 24 "f = \+ focal length of lens" }}{PARA 0 "" 0 "" {TEXT -1 27 "L = distance betw een lenses" }}{PARA 0 "" 0 "" {TEXT -1 28 "y1 = initial height of ray \+ 1" }}{PARA 0 "" 0 "" {TEXT -1 35 "phi1 = initial inclination of ray 1 " }}{PARA 0 "" 0 "" {TEXT -1 23 "x0 = start of ray trace" }}{PARA 0 " " 0 "" {TEXT -1 23 "xmax = end of ray trace" }}{PARA 0 "" 0 "" {TEXT -1 88 "r[i][y[i],phi[i]] = vector with components of height (y) and an gle (phi) of ray number i" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}} {EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 8 "restart:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 13 "with(linal g):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 12 "with(plots):" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "##Calculate separations need ed for calculations" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "L1:= x1-x0:L2:=x2-x1:L3:=xmax-x2:" }}}{EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 41 "## Calculate matrices that prop agate rays" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 68 "m1:=matrix(2, 2,[1,L1,0,1]): #translate ray from object to first lens" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "m2:=matrix(2,2,[1,0,-1/f1,1]): #ben d ray at first lens" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 69 "m3:= matrix(2,2,[1,L2,0,1]): #translate from first lens to second lens" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 55 "m4:=matrix(2,2,[1,0,-1/f2,1] ): #bend ray at second lens" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "m5:=matrix(2,2,[1,L3,0,1]): #translate to end of trace" }}}{EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 60 "# # Define and propagate [height, angle] coordinates for rays" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "for i from 1 to 5" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 " do" }}{PARA 2 "" 0 "" {TEXT -1 1 "\n " }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 45 " r0[i]:=matrix(2,1,[ y[i],phi[i]]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 " r1[i] :=evalm(m1&*r0[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 " \+ r2[i]:=evalm(m2&*r1[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 36 " \+ r3[i]:=evalm(m3&*r2[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " \+ r4[i]:=evalm(m4&*r3[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 35 " r5[i]:=evalm(m5&*r4[i]):" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 9 " od:" }}}{EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 46 "## Calculate the (x,y) coordinates of each \+ ray" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 17 "for i from 1 to 5" } }{PARA 0 "> " 0 "" {MPLTEXT 1 0 6 " do" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 98 " ray[i]:=[[x0,y[i]],[x1,r1[i][1,1]],[x2,r3[i][ 1,1]],[xmax,r5[i][1,1]]]; #x,y pairs for rays" }}{PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 7 " od;" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 72 "############### Input Numeri cal Values for Particular System ###########" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 29 "#s tart and end points of plot" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 16 "x0:=0: xmax:=35:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 52 "#de scribe the position and focal length of each lens" }}}{EXCHG {PARA 0 " > " 0 "" {MPLTEXT 1 0 27 "x1:=10: f1:=5: #lens 1" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 26 "x2:=25: f2:=15: #lens 2" }}} {EXCHG {PARA 2 "" 0 "" {TEXT -1 1 "\n" }}{PARA 0 "> " 0 "" {MPLTEXT 1 0 49 "#specify the initial height and angle of each ray" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 111 " y[1]:=1:phi[1]:=0: y[2]:=1:phi[ 2]:=0.5: y[3]:=1:phi[3]:=-.5: y[4]:=1:phi[4]:=0.25: y[5]:=1:phi[5]: =-0.25:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 82 "plot(\{ray[1],ra y[2],ray[3],ray[4],ray[5]\},x=15..xmax, title=`Paraxial Ray Trace`);" }}}}{MARK "14 0 0" 1 }{VIEWOPTS 1 1 0 1 1 1803 }