Here is the Matlab code. Set x and y amplitude < 1 when it asks or it won't fit on the axes. File name is the name of the movie file that will be generated. % Define x and y amplitudes and wave vector Ax = input('X Amplitude? '); % x amplitude Ay = input('Y Amplitude? '); % y amplitude lamda = 2; % wavelength k = 2*pi/lamda; % wave vector dphi = input('Phase Difference in degrees? ')*pi/180; % phase difference z = linspace(0,4,160); % spatial variation % define time vector t = linspace(0,1,50); vp = 4; % phase velocity defines how fast animation moves f = vp/lamda; % set frequency w = 2*pi*f; % set up to capture a movie... % Prepare the new file. filename = input('File Name?','s'); vidObj = VideoWriter(filename); open(vidObj); % run nested loops to plot the wave... for m = 1:length(t) x = real(Ax*exp(-i*k*z) .* exp(i*w*t(m))); y = real(Ay*exp(-i*(k*z+dphi)) .* exp(i*w*t(m))); a = plot3(z,x,y,'r.'); set(a,'MarkerSize',10) for mm=2:length(x) %line([z(mm) z(mm)],[0 x(mm)],[0,y(mm)]) % use this for lines a=patch([z(mm) z(mm-1) z(mm-1) z(mm)],[0 0 x(mm-1) x(mm)],[0 0 y(mm-1) y(mm)],[.8 .8 .8]); set(a,'FaceAlpha',.7); set(a,'EdgeAlpha',.3); set(a,'EdgeColor',[0 .7 0]); end % set up graph a = line([0 max(z)],[0 0],[0 0]); set(a,'Color','k') box on grid on axis('equal') axis([0 4 -1 1 -1 1]) xlabel('Z') ylabel('X') zlabel('Y') % try to plot the overall line on xy plane trailx(m) = x(1); traily(m) = y(1); trailz(m) = 0; hold on plot3(trailz,trailx,traily,'k.'); hold off view(-45,20) % first plot a heavy line representing the source field along x a = line([0 0],[0 x(1)],[0 0]); set(a,'LineWidth',3) set(a,'Color',[1 0 0]); % now the y source field... a = line([0 0],[0 0],[0 y(1)]); set(a,'LineWidth',3) set(a,'Color',[0 0 1]); % and the overall source field as a green line a = line([0 0],[0 x(1)],[0 y(1)]); set(a,'LineWidth',3); set(a,'Color',[0 .75 0]); % plot two narrow black lines to clarify it is vector addition a = line([0 0],[x(1) x(1)],[0 y(1)]); set(a,'LineWidth',1); set(a,'Color',[0 0 0]); a = line([0 0],[0 x(1)],[y(1) y(1)]); set(a,'LineWidth',1); set(a,'Color',[0 0 0]); % Capture a frame for the video, and put in a pause pause(.05) currFrame = getframe(gcf); writeVideo(vidObj,currFrame); end trailx = 0; traily = 0 trailz = 0; % Close the video file. close(vidObj);
Thanks alot for the effort you put. I was not able to "understand" in my electromagnetics lecture but it is very clear with these simulations. Wish our school record the lectures and our instructors post vids like these. Thnx for the help :D
Thank You for grate physics videos. It also helps students far from Your University. I mean in Poland:) Best regards. Physics is so interesting indeed.
Does the offset have to be exactly 90 degrees in order for polarization to become circular? Or it enough to say the moment Y has a positive offset, the polarization becomes somewhat counter-clockwise? And the moment Y has a negative offset, the polarization becomes slightly clockwise? EDIT: Ah, nevermind, I hadn't seen the bit about elliptic polarization. Thank you for being so thorough! This is an excellent overview of wave polarization.
6:17 just a super friendly question , but shouldn't z and x be interchanged? The wave propagates in the xy field . So essentially it's going into the plane of the paper.
Sie🌟🌟, During interference of EM wave... electric field adds up like vector....if two electric field of EM wave of same amplitude ,frequency,inphase...when added by vector gives,E+E= 2E, but when we add Energy of E field WHICH IS PROPORTIONAL TO E^2...it contradicts (€E^2=2€E^2).... Similarly for distructive interference of two similar PLANE Em wave of PHASE DIFFERENCE of π interfering DESTRUCTIVELY COMPLETELY... IF E field becomes ZERO EVERY WHERE..... WHERE DOES ITS ENERGY GO?what is wrong here? Thank you sir 🌟
Two quick questions: 1. If you have a coherent light source and an incoherent light source with the same wavelength and power output etc., does that mean the electric field is larger for the coherent light source? 2. Can you talk about polarization, superposition, and the things discussed here in the same way when thinking about single photons? Thanks!
Putting in my two cents here. I am not sure about nr 1. I think that the amplitude is the same, just the direction changes constantly for non-polarized light. Does this answer the question? As for nr 2: we are in the world of quantum here, so a photon is not particle, it is something that can be described by a wavefunction. It can be at two different places at the same time, so it is valid say that it is possible that a single photon can have linear polarization in two directions, creating circular or elliptical polarization.
Wow amazing lectures. just a question. at around 6:30 you said to rotate the electric field in 90 degrees to create an X component and a Y component don't you mean a 45 degree rotation
There is just on thing that the video does not mention. The field has 3 components, but each component depends on just one variable: Z. Nice, Nice lesson.
awsome video... pls can u upload video on how to identify polarization among all 3 and it's types I.e. Right handed and left handed polarization please???
These videos are some of the most instructive and clear videos i've ever seen on CZcams. Glad I found you
I am VERY impressed that how Clear your lecture.
You're gonna be the sole reason I pass this midterm tomorrow you beautiful, gorgeous man
Here is the Matlab code. Set x and y amplitude < 1 when it asks or it won't fit on the axes. File name is the name of the movie file that will be generated.
% Define x and y amplitudes and wave vector
Ax = input('X Amplitude? '); % x amplitude
Ay = input('Y Amplitude? '); % y amplitude
lamda = 2; % wavelength
k = 2*pi/lamda; % wave vector
dphi = input('Phase Difference in degrees? ')*pi/180; % phase difference
z = linspace(0,4,160); % spatial variation
% define time vector
t = linspace(0,1,50);
vp = 4; % phase velocity defines how fast animation moves
f = vp/lamda; % set frequency
w = 2*pi*f;
% set up to capture a movie...
% Prepare the new file.
filename = input('File Name?','s');
vidObj = VideoWriter(filename);
open(vidObj);
% run nested loops to plot the wave...
for m = 1:length(t)
x = real(Ax*exp(-i*k*z) .* exp(i*w*t(m)));
y = real(Ay*exp(-i*(k*z+dphi)) .* exp(i*w*t(m)));
a = plot3(z,x,y,'r.');
set(a,'MarkerSize',10)
for mm=2:length(x)
%line([z(mm) z(mm)],[0 x(mm)],[0,y(mm)]) % use this for lines
a=patch([z(mm) z(mm-1) z(mm-1) z(mm)],[0 0 x(mm-1) x(mm)],[0 0 y(mm-1) y(mm)],[.8 .8 .8]);
set(a,'FaceAlpha',.7);
set(a,'EdgeAlpha',.3);
set(a,'EdgeColor',[0 .7 0]);
end
% set up graph
a = line([0 max(z)],[0 0],[0 0]);
set(a,'Color','k')
box on
grid on
axis('equal')
axis([0 4 -1 1 -1 1])
xlabel('Z')
ylabel('X')
zlabel('Y')
% try to plot the overall line on xy plane
trailx(m) = x(1);
traily(m) = y(1);
trailz(m) = 0;
hold on
plot3(trailz,trailx,traily,'k.');
hold off
view(-45,20)
% first plot a heavy line representing the source field along x
a = line([0 0],[0 x(1)],[0 0]);
set(a,'LineWidth',3)
set(a,'Color',[1 0 0]);
% now the y source field...
a = line([0 0],[0 0],[0 y(1)]);
set(a,'LineWidth',3)
set(a,'Color',[0 0 1]);
% and the overall source field as a green line
a = line([0 0],[0 x(1)],[0 y(1)]);
set(a,'LineWidth',3);
set(a,'Color',[0 .75 0]);
% plot two narrow black lines to clarify it is vector addition
a = line([0 0],[x(1) x(1)],[0 y(1)]);
set(a,'LineWidth',1);
set(a,'Color',[0 0 0]);
a = line([0 0],[0 x(1)],[y(1) y(1)]);
set(a,'LineWidth',1);
set(a,'Color',[0 0 0]);
% Capture a frame for the video, and put in a pause
pause(.05)
currFrame = getframe(gcf);
writeVideo(vidObj,currFrame);
end
trailx = 0;
traily = 0
trailz = 0;
% Close the video file.
close(vidObj);
thank you i was looking for the code .
Thanks alot for the effort you put.
I was not able to "understand" in my electromagnetics lecture but it is very clear with these simulations.
Wish our school record the lectures and our instructors post vids like these.
Thnx for the help :D
Thank You for grate physics videos. It also helps students far from Your University. I mean in Poland:) Best regards. Physics is so interesting indeed.
الله اكبر
الحمد لله
لاحول و لا قوة الا بالله
الله اكبر
اللهم صل و بارك على سيدنا و نبينا محمد
Thank you so much !! Finally I got to understand wave polarization
I can't thank you enough sir , you saved my life
My left ear really learned a lot from this video.
wow, really high quality and clear explanation.
Does the offset have to be exactly 90 degrees in order for polarization to become circular? Or it enough to say the moment Y has a positive offset, the polarization becomes somewhat counter-clockwise? And the moment Y has a negative offset, the polarization becomes slightly clockwise?
EDIT:
Ah, nevermind, I hadn't seen the bit about elliptic polarization. Thank you for being so thorough! This is an excellent overview of wave polarization.
clearly. thank you
Thank you for posting such a helpful video! It was very clear and concise.
Amazing!!! Thanks
Thank you very much!!! Very good explanation and description regarding the wave Polarization. Really Really Helpfull...
12:00 make me understanding, VERY nice graphic simulation
Excellent video... really good and precise details...
thank you
Great thanks. You are perfect teacher.
Amazing. Thank You!
I want to ask one question .If the phase angle is 180 degree this waves must be linear polarization ?
Lovely Video...;Thank you for uploading such great stuff....:)
Can you make a lecture on how to represent polarazation in matlab
thanks a lot, this is helpful!
6:17 just a super friendly question , but shouldn't z and x be interchanged? The wave propagates in the xy field . So essentially it's going into the plane of the paper.
Sie🌟🌟, During interference of EM wave... electric field adds up like vector....if two electric field of EM wave of same amplitude ,frequency,inphase...when added by vector gives,E+E= 2E, but when we add Energy of E field WHICH IS PROPORTIONAL TO E^2...it contradicts (€E^2=2€E^2)....
Similarly for distructive interference of two similar PLANE Em wave of PHASE DIFFERENCE of π interfering DESTRUCTIVELY COMPLETELY... IF E field becomes ZERO EVERY WHERE.....
WHERE DOES ITS ENERGY GO?what is wrong here?
Thank you sir 🌟
very informative and well explained
Two quick questions:
1. If you have a coherent light source and an incoherent light source with the same wavelength and power output etc., does that mean the electric field is larger for the coherent light source?
2. Can you talk about polarization, superposition, and the things discussed here in the same way when thinking about single photons?
Thanks!
Putting in my two cents here. I am not sure about nr 1. I think that the amplitude is the same, just the direction changes constantly for non-polarized light. Does this answer the question?
As for nr 2: we are in the world of quantum here, so a photon is not particle, it is something that can be described by a wavefunction. It can be at two different places at the same time, so it is valid say that it is possible that a single photon can have linear polarization in two directions, creating circular or elliptical polarization.
Nice explanation..... thanks sir
Quality stuff!
The plane of incidence not correctly stated I suppose in 19:01
tnx for your great vidoes.
Can I have the matab codes for the animation at 12:22 ?
Wow amazing lectures. just a question. at around 6:30 you said to rotate the electric field in 90 degrees to create an X component and a Y component don't you mean a 45 degree rotation
Nathaniel Talker yes. It's 45 degrees
thank you very much sir
There is just on thing that the video does not mention. The field has 3 components, but each component depends on just one variable: Z. Nice, Nice lesson.
You mean components in three directions, usually orthogonal and denoted x, y and z. Where z is the propagating direction.
you are amazing
Great!
❤❤
Fantastic
thanks a lot guy
What if they have the SAME amplitude but a phase difference not equal to 90?
Then you get elliptical polarization.
Sir, could you share the matlab code for the animation? Thank you
Very nice video :'D thanks. Just a request could you please share those MATLAB codes of the simulations? c:
awsome video...
pls can u upload video on how to identify polarization among all 3 and it's types I.e. Right handed and left handed polarization please???
Rohit sharma Shocker, the street shitter doesn't know logical reasoning. The toilet witches in Dehli must have stolen it.
😁
You rock!
Dayum
Great video thanks a lot
👍👍