# script to generate phase space plots of the damped sho set terminal postscript eps color enhanced size 15cm,5cm font "Times-Italic,24pt" dashlength 2.0 set output "phasespacessho.eps" set multiplot set parametric unset tics set border 0 x(t,a,beta,delta)=a*exp(-beta*t)*cos(t-delta) xp(t,a,beta,delta)=-a*(beta*cos(t-delta)+sin(t-delta))*exp(-beta*t) y(t,a,beta,b)=a*exp((-beta-sqrt((beta**2)-1))*t)+b*exp((-beta+sqrt((beta**2)-1))*t) yp(t,a,beta,b)=-a*exp((-beta-sqrt((beta**2)-1))*t)*(beta+sqrt((beta**2)-1))-b*exp((-beta+sqrt((beta**2)-1))*t)*(beta-sqrt((beta**2)-1)) set style arrow 3 head filled size screen 0.025,10 lc rgb 'red' lt -1 lw 0.01 # first plot: undamped osc set origin 0,0 set size 0.35,1 set xrange [-1.2:1.2] set yrange [-1.2:1.2] set trange [0:2*pi] set arrow 1 from -1.3,0 to 1.3,0 filled set arrow 2 from 0,-1.3 to 0,1.3 filled set label 1 "x" at 1.2,-.2 set label 2 "p" at -.3,1.3 set arrow 3 from cos(pi/4+.2),sin(pi/4+.2) to cos(pi/4),sin(pi/4) as 3 set arrow 4 from .6*cos(pi/4+.2),.6*sin(pi/4+.2) to .6*cos(pi/4),.6*sin(pi/4) as 3 set label 3 "{/Symbol b} {/Times-Roman = 0}" at -1.2,-1 plot x(t,1,0,0),xp(t,1,0,0) lt 1 lc rgb 'red' notitle,\ x(t,.6,0,0),xp(t,.6,0,0) lt 1 lc rgb 'red' notitle # second plot: undamped osc set origin .333,0 set size 0.35,1 set label 3 "{/Times-Roman 0 < }{/Symbol b} {/Times-Roman < 1}" at -1.2,-1 set arrow 3 from .787,.54 to .87,.35 as 3 unset arrow 4 set trange [0:40] plot x(t,1,.1,.7),xp(t,1,.1,.7) notitle # third plot: undamped osc set origin .666,0 set size 0.35,1 set label 3 "{/Symbol b} {/Times-Roman > 1}" at -1.2,-1 set trange [0:10] beta=1.3 gx(t)=(t-5)/5 gy(t)=-(t-5)/5*(beta+sqrt((beta**2)-1)) hy(t)=-(t-5)/5*(beta-sqrt((beta**2)-1)) set arrow 3 from .56,1 to .62,.8 as 3 set arrow 4 from -.15,.8 to -.06,.6 as 3 set arrow 5 from -.9,.9 to -.74,.65 as 3 set arrow 6 from -.15,-.5 to -.22,-.3 as 3 set arrow 7 from .93,-1. to .81,-.8 as 3 # set xtics .1 # set ytics .1 plot y(t,.7,beta,.7),yp(t,.7,beta,.7) lt 1 lc rgb 'red' notitle, \ y(t,-1,beta,1.4),yp(t,-1,beta,1.4) lt 1 lc rgb 'red' notitle, \ y(t,-.5,beta,-.7),yp(t,-.5,beta,-.7) lt 1 lc rgb 'red' notitle, \ y(t,-.5,beta,.3),yp(t,-.5,beta,.3) lt 1 lc rgb 'red' notitle, \ y(t,.8,1.2,-.7),yp(t,.8,1.2,-.7) lt 1 lc rgb 'red' notitle, \ gx(t),gy(t) notitle lt 3 lc rgb 'black', \ gx(t),hy(t) notitle lt 3 lc rgb 'black'