I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.
% A very simple code to illustrate the phase-shift in a plane wave% Things become much more complex if the effects of diffraction are% included.Lx=1;Ly=0.4;Mx=Lx/2;Wy=Ly/2;M=400;N=floor(M*Ly/Lx);[X,Y]=meshgrid(linspace(0,Lx,M),linspace(0,Ly,N));k=100;% the wavenumberZ=real(exp(i*k*X));% The field Z with a phase-shifted partS=find(X>Mx&Y<Ly/2+Wy/2&Y>Ly/2-Wy/2);W=Z;W(S)=W(S)*exp(i*pi);figure(1);clf;holdon;axisequal;axisoff;surf(X,Y,real(Z));downshift=1.5*Ly;surf(X,Y-downshift,real(W));view(0,90);shadingflat;colormapcopper;axis([0,Lx,-downshift,Ly]);saveas(gcf,'Phase-shift_illustration.eps','psc2');
This simple math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with {{vector version available|new image name}}.
It is recommended to name the SVG file “Phase-shift illustration.svg”—then the template Vector version available (or Vva) does not need the new image name parameter.
Captions
Add a one-line explanation of what this file represents