# 8. Inteferences using Fresnel biprism¶

A classical experiment in Optics is the interference process by a Fresnel biprism. In order to obtain a interference, a monocromatic light beam needs to be divided into two coherent waves and join them again. This can be performed using a Fresnel biprism.

To analyze the inteference process, we have used the XY and XZ framework.

## 8.1. XY formalism¶

:

from diffractio import degrees, mm, plt, sp, um, np
from diffractio.scalar_fields_XY import Scalar_field_XY
from diffractio.scalar_sources_XY import Scalar_source_XY

number of processors: 8
total memory        : 7.5 Gb
available memory    : 55 %
max frequency       : 4000 GHz

:

from matplotlib import rcParams
rcParams['figure.figsize']=(5,5)
rcParams['figure.dpi']=125


In the first place, we create a plane wave and mask it with a circular aperture.

:

x0 = np.linspace(-.2*mm,.2*mm,1024)
y0 =  np.linspace(-.2*mm,.2*mm,1024)
wavelength = 0.6238 * um

:

u0 = Scalar_source_XY(x=x0, y=y0, wavelength=wavelength)
u0.plane_wave()

t0.circle(r0=(0 * um, 0 * um), radius=(.2*mm,.2*mm))



After that, we generate a Fresnel Biprism mask. The field just after the Fresnel biprism is just the multiplication of the field by the two masks.

:

t1 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength)
t1.biprism_fresnel(
r0=(0 * um, 0 * um), width=.2*mm, height=5 * um, n=1.5)

u1 = t0 * t1 * u0


Then, we create a function in order to draw the intensity distribution at a distance z after the mask.

:

def difraccion_biprism_Fresnel(u1, z_mask):
"""Computes and draws the intensity distribution of a light beam after a mask.

Parameters:
u1 (Scalar_field_XY): Field just after the mask.

else:
u2 = u1

u2.draw(kind='intensity')
plt.title("$z={:2.2f}\,um$".format(z_mask), fontsize=24)


Now, let us show what is the light field just after the grating

:

difraccion_biprism_Fresnel(u1, z_mask=0*mm) And now, at different increasing distances:

:

difraccion_biprism_Fresnel(u1,z_mask=.3*mm) :

difraccion_biprism_Fresnel(u1,z_mask=1*mm) :

difraccion_biprism_Fresnel(u1,z_mask=2*mm) :

difraccion_biprism_Fresnel(u1,z_mask=5*mm) Nevertheless, after a certain distance, the light from both biprism separates and interferences is not produced:

:

difraccion_biprism_Fresnel(u1,z_mask=10*mm) We can see that fringes appear while the two beams, produced by it face of the Fresnel briprism, coincides in space.

## 8.2. XZ formalism¶

Now, let us show the same case for XZ formalism. In this case, we can see how light is modified by the briprism, as no Thin Element Approximation is necessary.

:

from diffractio import degrees, mm, plt, sp, um, np
from diffractio.scalar_sources_X import Scalar_source_X

:

num_x = 1024*4
num_z = 1024*2
x0 = np.linspace(-75, 75, num_x)
z0_near = np.linspace(0*um, 25*um, num_z)
z0_all = np.linspace(0*um, 1000*um, num_z)

wavelength = 0.6238 * um


:

u0 = Scalar_source_X(x=x0, wavelength=wavelength)
u0.plane_wave()


:

t0 = Scalar_mask_XZ(x=x0, z=z0_near, wavelength=wavelength)
t0.biprism(r0=(0*um, 5*um), length=100*um, height=5*um, refraction_index=1.5, angle=0*degrees)
t0.incident_field(u0)


:

t0.WPM(verbose=True)

Time = 2.93 s, time/loop = 1.43 ms

:

t0.draw(kind='intensity', draw_borders=True)

:

<matplotlib.image.AxesImage at 0x7f6948492e50> :

t0.draw(kind='phase', draw_borders=True)
plt.xlim(0,25)
plt.ylim(-50,50); :

u_far = Scalar_mask_XZ(x=x0, z=z0_all, wavelength=wavelength)
u_far.biprism(r0=(0*um, 5*um), length=100*um, height=5*um, refraction_index=1.5, angle=0*degrees)
u_far.incident_field(u0)


:

u_far.WPM(verbose=True)

Time = 2.40 s, time/loop = 1.173 ms

:

u_far.draw(kind='intensity', draw_borders=True)
plt.ylim(-50*um, 50*um)

:

(-50.0, 50.0) :

u_field_last_plane=u_far.profile_transversal(z0=500*um)
plt.xlim(-50*um, 50*um)

:

(-50.0, 50.0) Here, we see the intensity distribution at z=500$$\mu$$m, showing the interference process.

In addition, in the XZ formalism we have a tool for interactively draws the profiles at different distances.

:

%matplotlib widget
u_far.draw_profiles_interactive(kind='intensity') :

%matplotlib inline
rcParams['figure.figsize']=(5,5)
rcParams['figure.dpi']=125


## 8.3. Polarization¶

:

from diffractio import degrees, mm, plt, sp, um, np
from diffractio.scalar_fields_XY import Scalar_field_XY
from diffractio.scalar_sources_XY import Scalar_source_XY

from diffractio.vector_paraxial_sources_XY import Vector_paraxial_source_XY
from diffractio.vector_paraxial_fields_XY import Vector_paraxial_field_XY


:

x0 = np.linspace(-.2*mm,.2*mm,1024)
y0 =  np.linspace(-.2*mm,.2*mm,1024)
wavelength = 0.6238 * um


:

u0=Scalar_source_XY(x0,y0,wavelength)
u0.plane_wave(A=1)

:

EM0 = Vector_paraxial_source_XY(x0, y0, wavelength)
EM0.constant_wave(u0,v=[1/np.sqrt(2), 1/np.sqrt(2)])

:

EM0.__draw_ellipses__(num_ellipses=(31,31), amplification=.75, color_line='r', head_width=2,
logarithm=False, normalize=True, cut_value='') :

t0 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength)
t0.circle(r0=(0 * um, 0 * um), radius=(200 * um, 200 * um))

:

t1 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength)
t1.biprism_fresnel(
r0=(0 * um, 0 * um), width=200 * um, height=5 * um, n=1.5)

u1 = t0 * t1

:

u1.draw(kind='phase'); :

EM1 = Vector_paraxial_mask_XY(x0, y0, wavelength)
EM1.polarizer_linear(azimuth=45*degrees)
EM1.draw()

<Figure size 625x625 with 0 Axes> :

t2 = Scalar_mask_XY(x=x0, y=y0, wavelength=wavelength)
t2.two_levels(level1=0, level2=1)

:

EM2 = Vector_paraxial_mask_XY(x0, y0, wavelength)
EM2.complementary_masks(t2, state_0=np.array([[1, 0], [0, 0]]), state_1=np.array([[0, 0],  [0, 1]]))
EM2.draw();

<Figure size 625x625 with 0 Axes> :

EM3=EM0*EM1*EM2

:

EM3.draw('ellipses', num_ellipses=(31,31), color_line='r', amplification=0.75, head_width=1); :

EM4=EM3.RS(z=4*mm)

:

EM4.__draw_ellipses__(num_ellipses=(31,31), color_line='r', amplification=0.75, head_width=1); :

h1,h2=EM4.draw('intensities'); 