Assume you have light incident from air onto gold, at a free-space wavelength of 700 nm. Using the complex refractive index of gold (n+ik) n=0.27732,k = 2.9278

35 views (last 30 days)
plot 𝑅𝑠 and 𝑅𝑝 as a function of the incident angle 𝜃1 from 0 to 90°.
% Constants
n_air = 1; % Refractive index of air
lambda_700nm = 700e-9; % Wavelength in meters
% Complex refractive index for gold at 700 nm
n_gold_700nm = 0.27732; % Real part of refractive index
k_gold_700nm = 2.9278; % Extinction coefficient
% Calculate the reflection coefficient as a function of the angle of incidence
theta1 = linspace(0, pi/2, 1000); % Incident angles from 0 to 90 degrees
theta2_700nm = asin(sin(theta1) * n_air / n_gold_700nm); % Snell's law, adjusted for complex n
% Reflection coefficient for s-polarization at 700 nm
rs_700nm = ((n_air * cos(theta1)) - (n_gold_700nm + 1i * k_gold_700nm) * cos(theta2_700nm)) ./ ...
((n_air * cos(theta1)) + (n_gold_700nm + 1i * k_gold_700nm) * cos(theta2_700nm));
Rs_700nm = abs(rs_700nm).^2;
% Plot Rs for gold at 700 nm
figure;
plot(rad2deg(theta1), Rs_700nm, 'DisplayName', 'Rs at 700 nm');
xlabel('Incident angle \theta_1 (degrees)');
ylabel('Reflection coefficient Rs');
title('Reflection Coefficient for Gold at 700 nm');
legend('show');
grid on;
I have typed this code but not getting the correct plot for it

Answers (1)

Milan Bansal
Milan Bansal on 28 Mar 2024 at 10:07
Hi Omeir,
It is my understanding you are trying to calculate reflection coefficients and as a function of incident angle for light incident from air onto gold at a free-space wavelength of 700 nm but you are not able to get correct plots.
There are a few adjustments needed in the given code snippet to correctly calculate and plot both () and (). The calculation of the angle () using Snell's law directly is not straightforward due to the complex refractive index of gold. For materials with complex refractive indices, the transmission angle () also becomes complex, and Snell's law needs to be adjusted to account for this.
,
where are the real and imaginary parts of the complex refractive index of the second medium, respectively
Please refer to the code snippet below to correctly calculate .
% Constants
n_air = 1; % Refractive index of air
lambda_700nm = 700e-9; % Wavelength in meters
% Complex refractive index for gold at 700 nm
n_gold = 0.27732 + 2.9278i; % n + ik
% Calculate the reflection coefficient as a function of the angle of incidence
theta1 = linspace(0, pi/2, 1000); % Incident angles from 0 to 90 degrees in radians
% Reflection coefficients for s- and p-polarization
rs = zeros(1, length(theta1));
rp = zeros(1, length(theta1));
%% Calculating R_s and R_p
for i = 1:length(theta1)
%% Calculating theta_2 with adjusted snell's law
cos_theta2 = sqrt(1 - ((n_air/n_gold)^2) * sin(theta1(i))^2);
% s-polarization
rs(i) = abs(((n_air * cos(theta1(i))) - (n_gold * cos_theta2)) / ((n_air * cos(theta1(i))) + (n_gold * cos_theta2)))^2;
% p-polarization
rp(i) = abs(((n_gold * cos(theta1(i))) - (n_air * cos_theta2)) / ((n_gold * cos(theta1(i))) + (n_air * cos_theta2)))^2;
end
% Plot Rs and Rp for gold at 700 nm
figure;
plot(rad2deg(theta1), rs, 'DisplayName', 'Rs at 700 nm');
hold on;
plot(rad2deg(theta1), rp, 'DisplayName', 'Rp at 700 nm');
xlabel('Incident angle \theta_1 (degrees)');
ylabel('Reflection coefficient');
title('Reflection Coefficient for Gold at 700 nm');
legend('show');
grid on;
Hope this helps

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!