Here is a code modeling the diffraction of light.
I made this because I want simulate the diffraction of light and visualize the light's density. It's Fresnel diffraction, and I want to see the Density of light according to distance about slit and screen. 'z' meens distance about slit and screen. 'lamda' meens wavelength of light. This is a slit that has hole and disk. and 'a' meens diameter of hole and 'z' meens diameter of Disk. This is simulation about hole aed Disk, and it can make effect Disk and hole, because of Interference of light
z = 16;
a = 2/10^3;
m = 6/10^3;
λ = 532/10^9;
k = (2*Pi)/λ;
n = (k*q*m)/z;
v = (k*q*a)/z;
q = Sqrt[x^2 + y^2];
Subscript[U, 1] =
Sum[(a/q)^(4*i + 1)*BesselJ[4*i + 1, v], {i, 0, 3}] -
Sum[(a/q)^(4*i + 3)*BesselJ[4*i + 3, v], {i, 0, 3}];
Subscript[U, 2] =
Sum[(a/q)^(4*i + 2)*BesselJ[4*i + 2, v], {i, 0, 3}] -
Sum[(a/q)^(4*i + 4)*BesselJ[4*i + 4, v], {i, 0, 3}];
Subscript[V, 0] =
Sum[(q/m)^(4*i)*BesselJ[4*i, n], {i, 0, 3}] -
Sum[(q/m)^(4*i + 2)*BesselJ[4*i + 2, n], {i, 0, 3}];
Subscript[V, 1] =
Sum[(q/m)^(4*i + 1)*BesselJ[4*i + 1, n], {i, 0, 3}] -
Sum[(q/m)^(4*i + 3)*BesselJ[4*i + 3, n], {i, 0, 3}];
When I evaluate the following DensityPlot
expression,
DensityPlot[
Subscript[U, 1]^2 + Subscript[U, 2]^2 +
Subscript[V, 0]^2 + Subscript[V, 1]^2 + 1 +
2*((Subscript[U, 1]*Subscript[V, 0] +
Subscript[U, 2]*Subscript[V, 1])*Sin[(k*(m^2 - a^2))/(2*z)] +
(Subscript[U, 2]*Subscript[V, 0] -
Subscript[U, 1]*Subscript[V, 1])*Cos[(k*(m^2 - a^2))/(2*z)] +
Subscript[U, 1]*Sin[(k*(q^2 + a^2))/(2*z)] -
Subscript[U, 2]*Cos[(k*(q^2 + a^2))/(2*z)] -
Subscript[V, 0]*Cos[(k*(q^2 + m^2))/(2*z)] -
Subscript[V, 1]*Sin[(k*(q^2 + m^2))/(2*z)]),
{x, -1./10^2, 1./10^2}, {y, -1./10^2, 1./10^2},
PlotRange -> {0, 6.}, PlotPoints -> 120, Mesh -> False,
Frame -> False, AspectRatio -> 1]
I get this image
My problem/questions:
DensityPlot
withq
andz
on your axes instead of aDensityPlot3D
withx,y
andz
. $\endgroup$