% Simulation d'un dispositif de Haidinger close all; clear e = 0.100e-3 n = 1.5 lambda = 630e-9 f = 0.05; RGB = spectrumRGB(lambda*1e9) theta_i_deg = -10:0.2:10; theta_i = theta_i_deg * pi/180; delta = 4*pi*e/lambda * sqrt(n^2 - sin(theta_i).^2) - pi; % theta_t = asin(sin(theta_i/n)); % sep_rayons = 2*e*tan(theta_t); r = f*theta_i; I = 4*cos(delta/2).^2; figure; plot (r,I,'r') rgb = I'/max(I) * RGB; franges_circ (r, I, rgb); xlabel('x (m)'); ylabel('y (m)') title ('intensité des franges dans le plan focal') lam = [450:50:650]*1e-9 col = 'bcgyr'; nl = length(lam); figure; hold on for i=1:nl delta = 4*pi*e/lam(i) * sqrt(n^2 - sin(theta_i).^2) - pi; I(i,:) = 4*cos(delta/2).^2; plot(r,I(i,:),col(i)) end hold off grid on; legend ('bleu','cyan','vert','jaune','rouge') for i = 1:size(I,2) Itot = sum(I,1)/nl; end figure; plot(r,Itot) grid on title ('lumière blanche') % calculons les équivalents RGB des lambda for i = 1:length(lam) rgbi(i,:) = spectrumRGB(lam(i)*1e9); end % calibration des RGB pour que la somme des 5 couleurs donne [1 1 1] = blanc sum_RGB = sum(rgbi,1) for i = 1:3 RGBi(:,i) = rgbi(:,i) ./ sum_RGB(i); end clear rgb_lam for i = 1:nl max_I = max(I(i,:)); rgb_lam (i,:,:) = I(i,:)'/max_I * RGBi(i,:); end rgb_tot = sum (rgb_lam,1); franges_circ (r, Itot, rgb_tot); xlabel('x (m)'); ylabel('y (m)') title ('Franges en lumière blanche')