#The thickness
#given data :
lamda=589.3*10**-9## in m
ne=1.553#J
no=1.544#
x=(lamda/(4*(ne-no)))*10**3#
print "The thickness of the a quarter wave plate,x = %0.4f mm"%x
#The thickness
#given data :
lamda=589.3*10**-9## in m
ne=1.486#
no=1.658#
x=(lamda/(2*(no-ne)))*10**3#
print "The thickness of the a quarter wave plate,x = %0.4f mm"%x
from __future__ import division
from math import pi
#change in refractive index ,net phase shiftand Vpi
v=5##kV
l=1##cm
ez=(v*10**3)/(l*10**-2)##in V/m
no=1.51##
r63=10.5*10**-12##m/V
dn=((1/2)*no**3*r63*ez)##
h=550##nm
dfi=((2*pi*dn*l*10**-2)/(h*10**-9))##
fi=2*dfi##
vpi=((h*10**-9)/(2*no**3*r63))*10**-3##kV
print "change in refrative index = %0.3f"%dfi
print "net phase shift = %0.3f "%fi
print "Vpi = %0.2f kV"%vpi
#refractive index and phase shift is in the form of pi in the textbook
from __future__ import division
from math import pi
#phase difference,additional phase difference and Vpi
print "part (a)"
h=550##nm
l=3##cm
no=1.51##
ne=1.47##
dfi=((2*pi*l*10**-2*(no-ne))/(h*10**-9))##
print "phase differnce = %0.3e"%dfi
#phase difference is in the form of pi in the textbook
print "part (b)"
no=1.51##
r63=26.4*10**-12##m/V
V=200##
d=0.25##cm
dfi=((pi*r63*no**3*(V)*(l*10**-2))/(h*10**-9*d*10**-2))##
print "additional phase differnce = %0.3f"%dfi
#additional phase difference is in the form of pi in the textbook
print "part (c)"
r63=26.4*10**-12##m/V
V=200##
d=0.25##cm
dfi=((pi*r63*no**3*(V)*(l*10**-2))/(h*10**-9*d*10**-2))##
vpi=((h*10**-9)/(no**3*r63))*(d/l)##V
print "Vpi = %0.2f V"%vpi
from __future__ import division
from math import asin,degrees
#angle and relative intensity
#given data :
print "part (a)"
m=1#
l=633*10**-9## in m
f=5*10**6## in Hz
v=1500##in m/s
n=1.33## for water
A=v/f#
theta=asin((l/(n*A)))#
print "angle = %0.2f degree"%degrees(theta)
print "part (b)"
del_n=10**-5#
L=1*10**-2## in m
lamda=633*10**-9## in m
eta=(pi**2*del_n**2*L**2)/lamda**2#
print "The relative intensity = %0.3f"%eta