Plane Wave

Takuichi Hirano

<< Graphics`PlotField`;
<< Graphics`PlotField3D`;
n = 8;
ω = 2*π;
λ = 1;
k = ((2*π)/λ);
a = 1;
e = a*Exp[-I*k*z]*{1, 0, 0};
Table[
        PlotVectorField3D[
          Re[e*Exp[I*ω*t]], {x, -1, 1}, {y, -1, 1}, {z, 0, 
            2}, 
BoxRatios -> {1, 1, 
              1}, 
ColorFunction -> (Hue[-0.7*(# - 1), 1, 1] &)], 
{t, 0, 1 - 1/n, 
          1/n}
];

n = 16;
gv = 
        Table[PlotVectorField[
            Drop[Re[e*Exp[I*ω*t]], -1], {x, -0.5, 
              0.5}, {z, -0.5, 0.5}, 
PlotPoints -> 
              10, 
ColorFunction -> (RGBColor[1, 1, 
                    1] &), 
DisplayFunction -> 
              Identity], 
{t, 0, 1 - 1/n, 
            1/n}
];
gs = 
        Table[ContourPlot[(Abs[
                  Re[e*Exp[I*ω*t]]])[[1]], {x, -0.5, 
              0.5}, {z, -0.5, 
              0.5}, 
ColorFunction -> (Hue[-0.7*(# - 1), 1, 1] &), 
Contours -> 
              8, 
DisplayFunction -> 
              Identity], 
{t, 0, 1 - 1/n, 
            1/n}
];
Table[
        Show[{gs[[i]], 
            gv[[i]]}, 
PlotRange -> {{-0.5, 
                0.5}, {-0.5, 0.5}}, 
FrameTicks -> 
            None, 
DisplayFunction -> $DisplayFunction], 
{i, 1, n}];