Here is the 2D hair diffraction pattern plotted over the range of -10 mm to 10 mm on both the x- and y-axes. This provides a closer view of the diffraction pattern, allowing you to observe the intensity distribution within a smaller area around the center of the diffraction pattern. The color scale represents the normalized intensity of the diffraction fringes.
# Update the spatial range for the screen to -10 mm to 10 mm
x = np.linspace(-0.01, 0.01, 1000) # Screen range from -10 mm to 10 mm (x-axis)
y = np.linspace(-0.01, 0.01, 1000) # Screen range from -10 mm to 10 mm (y-axis)
X, Y = np.meshgrid(x, y) # Create a 2D grid
# Recalculate the radial distance and angle
r = np.sqrt(X**2 + Y**2)
theta = np.arctan(r / D)
# Recalculate the diffraction pattern intensity
beta = (np.pi * hair_diameter * np.sin(theta)) / wavelength
intensity = (np.sin(beta) / beta) ** 2
# Handle the singularity at beta = 0
intensity[beta == 0] = 1
# Plotting the 2D intensity distribution for -10 mm to 10 mm range
plt.figure(figsize=(8, 8))
plt.imshow(intensity, extent=(-10, 10, -10, 10), cmap='hot')
plt.colorbar(label='Intensity (normalized)')
plt.title('2D Hair Diffraction Pattern (650 nm Laser)')
plt.xlabel('Position on Screen X (mm)')
plt.ylabel('Position on Screen Y (mm)')
plt.show()
Here is the plot of the spatial intensity distribution for the hair diffraction experiment using a 650 nm laser. The x-axis represents the position on the screen in millimeters, and the y-axis shows the normalized intensity. This pattern simulates the diffraction pattern you would observe when a hair, approximated with a diameter of 50 micrometers, is placed in the path of the laser beam.
import numpy as np
import matplotlib.pyplot as plt
# Constants
wavelength = 650e-9 # Wavelength of laser (650 nm in meters)
D = 1.0 # Distance from hair to screen (in meters)
hair_diameter = 50e-6 # Approximate diameter of a hair (in meters)
# Spatial range for the screen (in meters)
x = np.linspace(-0.05, 0.05, 1000) # Screen range from -5 cm to 5 cm
# Calculate the angle theta for each x point
theta = np.arctan(x / D)
# Calculate the diffraction pattern intensity
beta = (np.pi * hair_diameter * np.sin(theta)) / wavelength
intensity = (np.sin(beta) / beta) ** 2
# To handle the singularity at beta = 0 (where sin(beta)/beta is undefined)
intensity[beta == 0] = 1
# Plotting the results
plt.figure(figsize=(10, 6))
plt.plot(x * 1000, intensity, color='blue')
plt.title('Hair Diffraction Pattern (650 nm Laser)')
plt.xlabel('Position on Screen (mm)')
plt.ylabel('Intensity (normalized)')
plt.grid(True)
plt.show()
The two-slit diffraction pattern is governed by the superposition of waves from two slits, and it incorporates both the diffraction effect from each slit and the interference between the two wavefronts.
Here's how you can simulate it:
Diffraction from Each Slit: This is similar to the single-slit case where you calculate the diffraction pattern based on the slit width.
Interference Between the Slits: This arises because light from the two slits interferes constructively and destructively depending on the path difference between the waves arriving at a point on the screen.
The overall intensity pattern is a product of the single-slit diffraction intensity and the interference pattern between the two slits.
We can write a Python program that simulates this for a two-slit diffraction setup using a 650 nm laser.
Let's define:
a: width of each slit
d: distance between the centers of the slits
D: distance from the slits to the screen
The intensity pattern I(x) will be:
where:
β=πasin(θ)/λ
θ: angle of diffraction for position x
λ: wavelength of the laser
Here is the simulated two-slit diffraction pattern using a 650 nm laser. The x-axis represents the position on the screen in millimeters, and the y-axis shows the normalized intensity. The resulting pattern combines both the diffraction from each slit and the interference between the two slits, producing the characteristic bright and dark fringes.
# Constants for the two-slit diffraction
wavelength = 650e-9 # Wavelength of laser (650 nm in meters)
D = 1.0 # Distance from slits to screen (in meters)
slit_width = 30e-6 # Width of each slit (30 micrometers)
slit_distance = 150e-6 # Distance between slits (150 micrometers)
# Spatial range for the screen (in meters)
x = np.linspace(-0.05, 0.05, 1000) # Screen range from -5 cm to 5 cm
# Calculate the angle theta for each x point
theta = np.arctan(x / D)
# Calculate the single-slit diffraction pattern
beta = (np.pi * slit_width * np.sin(theta)) / wavelength
diffraction_intensity = (np.sin(beta) / beta) ** 2
diffraction_intensity[beta == 0] = 1 # Handle singularity at beta = 0
# Calculate the interference pattern between the two slits
delta = (np.pi * slit_distance * np.sin(theta)) / wavelength
interference_intensity = (np.cos(delta)) ** 2
# Total intensity pattern is the product of diffraction and interference patterns
total_intensity = diffraction_intensity * interference_intensity
# Plotting the results
plt.figure(figsize=(10, 6))
plt.plot(x * 1000, total_intensity, color='blue')
plt.title('Two-Slit Diffraction Pattern (650 nm Laser)')
plt.xlabel('Position on Screen (mm)')
plt.ylabel('Intensity (normalized)')
plt.grid(True)
plt.show()
We can simulate multi-slit diffraction using the same principles as two-slit diffraction, but with additional slits. The overall diffraction pattern results from the combined effects of interference between multiple slits and diffraction from each slit.
The intensity pattern for multi-slit diffraction is governed by the interference of light waves from each slit, which is superimposed on the single-slit diffraction pattern. The total intensity is the product of the single-slit diffraction envelope and the interference term, which depends on the number of slits N.
where:
β=πasin(θ)/λ, with aaa being the width of each slit.
δ=2πdsin(θ)/λ, where ddd is the distance between adjacent slits.
N is the number of slits.
Let me write a Python program to simulate and plot the results for a multi-slit diffraction pattern.
Here is the simulated multi-slit diffraction pattern for a setup with 5 slits and a 650 nm laser. The x-axis represents the position on the screen in millimeters, while the y-axis shows the normalized intensity. The plot illustrates the characteristic bright and dark fringes due to the interference of light waves from multiple slits, combined with the diffraction envelope from the individual slits. As the number of slits increases, the fringes become sharper and more defined.
# Constants for multi-slit diffraction
wavelength = 650e-9 # Wavelength of laser (650 nm in meters)
D = 1.0 # Distance from slits to screen (in meters)
slit_width = 30e-6 # Width of each slit (30 micrometers)
slit_distance = 150e-6 # Distance between slits (150 micrometers)
num_slits = 5 # Number of slits
# Spatial range for the screen (in meters)
x = np.linspace(-0.05, 0.05, 1000) # Screen range from -5 cm to 5 cm
# Calculate the angle theta for each x point
theta = np.arctan(x / D)
# Single-slit diffraction pattern
beta = (np.pi * slit_width * np.sin(theta)) / wavelength
diffraction_intensity = (np.sin(beta) / beta) ** 2
diffraction_intensity[beta == 0] = 1 # Handle singularity at beta = 0
# Multi-slit interference pattern
delta = (2 * np.pi * slit_distance * np.sin(theta)) / wavelength
interference_intensity = (np.sin(num_slits * delta / 2) / np.sin(delta / 2)) ** 2
interference_intensity[delta == 0] = num_slits**2 # Handle singularity at delta = 0
# Total intensity pattern is the product of diffraction and interference patterns
total_intensity = diffraction_intensity * interference_intensity
# Plotting the results
plt.figure(figsize=(10, 6))
plt.plot(x * 1000, total_intensity, color='blue')
plt.title(f'Multi-Slit Diffraction Pattern ({num_slits} Slits, 650 nm Laser)')
plt.xlabel('Position on Screen (mm)')
plt.ylabel('Intensity (normalized)')
plt.grid(True)
plt.show()