Description Usage Arguments Examples
Phase calculation
1 |
th |
The angle at which the phase will be calculated |
m |
The relative refraction index |
x |
The form factor |
lmax |
The maximum value of |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # Bohren and Hoffman example, pg 114, section 4.4.5
th<-seq(0,pi,pi/199)
lmax<-5
m<-1.33+1e-8i
x<-3
u<-lmie.phs(th,m,x,lmax)
i.p<-abs(u$S2)**2 # paralell
i.s<-abs(u$S1)**2 # senkrecht (orthogonal)
P<-(i.s-i.p)/(i.s+i.p)
# Range
imx<-max(c(i.p,i.s))
imn<-min(c(i.p,i.s))
# Main plot
plot(cos(th)*i.s,sin(th)*i.s,type='l',lwd=1,asp=1,xlim=imx*c(-1,1),xlab="",ylab="")
points(cos(-th)*i.p,sin(-th)*i.p,type='l',lwd=1,col='red')
# x10 plot (zoom)
points(10*cos(th)*i.s,10*sin(th)*i.s,type='l',lwd=2)
points(10*cos(-th)*i.p,10*sin(-th)*i.p,type='l',lwd=2,col='red')
# Log plot
plot(th,i.p,type='l',log='y',ylim=c(imn,imx))
points(th,i.s,type='l',col='red')
# Polarization
plot(th,P,type='l')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.