Maple Text Commands for Chapter 14 -
ELECTROMAGNETIC WAVES AND OPTICAL RESONATORS
Figure 14.11(b): Chaotic attractor for the Ikeda map.
| > | # E1 is the complex electric field amplitude.
E1:=array(0..10000):x1:=array(0..10000):y1:=array(0..10000): maxm:=5000:B:=0.15:A:=10:E1[0]:=A:x1[0]:=A:y1[0]:=0: for i from 0 to maxm do E1[i+1]:=evalf(A+B*E1[i]*exp(I*(abs(E1[i]))^2)): x1[i+1]:=Re(E1[i+1]):y1[i+1]:=Im(E1[i+1]):end do: with(plots): points1:=[[x1[n],y1[n]]$n=180..maxm]: pointplot(points1,style=point,symbol=circle,symbolsize=1,color=blue,scaling=CONSTRAINED,axes=BOXED); |
Figure 14.10(b): Finding fixed points of period one. Only one point is approximated below.
| > | with(plots):B:=0.15:A:=2.2:
fsolve({A+B*(x*cos((x^2+y^2))-y*sin((x^2+y^2)))-x,B*(x*sin((x^2+y^2))+ y*cos((x^2+y^2)))-y},{x,y},{x=2.4..2.7,y=-0.5..0.5}); l1:=implicitplot(A+B*(x*cos((x^2+y^2))-y*sin((x^2+y^2)))-x,x=0..4,y=-5 ..5,grid=[100,100],color=red): l2:=implicitplot(B*(x*sin((x^2+y^2))+y*cos((x^2+y^2)))-y,x=0..4,y=-5.. 5,grid=[100,100],color=blue): display({l1,l2},axes=BOXED); |
Figure 14.14(b): Bifurcation diagram for the simple fiber ring resonator. There is an isolated hysteresis cycle.
| > | # Perform 4000 iterations and set the maximum input to 120 W/m^2.
# Input against output intensities. E1:=array(0..10000):E2:=(array..10000):Esqr:=array(0..10000): Esqr1:=array(0..10000):Asqr:=array(0..10000): halfm:=1999:mmax:=2*halfm+1:hh:=1+halfm: E1[0]:=0:C:=0.345913:kappa:=0.0225:Pmax:=120:phi:=0: # Ramp up for i from 0 to halfm do E2[i+1]:=evalf(E1[i]*exp(I*((abs(C*E1[i]))^2-phi))): E1[i+1]:=evalf(I*sqrt(1-kappa)*sqrt((i)*Pmax/hh)+sqrt(kappa)*E2[i+1]): Esqr[i+1]:=(abs(E1[i+1]))^2:end do: # Ramp down halfm1:=halfm+1: for i from halfm1 to mmax do E2[i+1]:=evalf(E1[i]*exp(I*((abs(C*E1[i]))^2-phi))): E1[i+1]:=evalf(I*sqrt(1-kappa)*sqrt(2*Pmax-(i)*Pmax/hh)+sqrt(kappa)*E2 [i+1]): Esqr[i+1]:=(abs(E1[i+1]))^2:end do: for i from 1 to halfm do Esqr1[i]:=Esqr[mmax+1-i]:end do: # The Bifurcation Diagram # with(plots): points1:=[n*Pmax/halfm1,Esqr[n]]$n=1..halfm: points2:=[n*Pmax/halfm1,Esqr1[n]]$n=1..halfm: t1:=textplot([100,1,`Input`],align=ABOVE): t2:=textplot([5,140,`Output`],align=RIGHT): p1:=pointplot({points1,points2},symbol=circle,symbolsize=1,color=blue): display({p1,t1,t2},font=[TIMES,ROMAN,15],axes=FRAMED); |
End of Chapter 14 Commands