-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathThickDiffuser.m
More file actions
43 lines (36 loc) · 994 Bytes
/
ThickDiffuser.m
File metadata and controls
43 lines (36 loc) · 994 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
% Generation of a thick forward scattering diffuser
% made of a stack of phase plates
%
% This code is written by Payvand Arjmand & Marc Guillon
% Contact info:
% payvand.arjmand@u-paris.fr
% marc.guillon@u-paris.fr
%
% function [e,w]=ThickDiffuser(L, ls, g, lambda, N_diff)
%
% INPUTs:
% L: Diffuser Thickness
% ls: scattering mean free path
% g: anisotropy factor
% lambda: wavelength
% N: matrix size (square)
% N_diff: Number of phase plates
%
% OUTPUTs:
% delta: (NxNxN_diff) mean squared roughness
% Theta_0: (rad) output scattering angle
function [delta, Theta_0]=ThickDiffuser(L, ls, g, lambda,px, N, N_diff)
if nargin==5
N_diff=10;
end
k=2*pi/lambda;
Theta_0=sqrt(L*(1-g)/ls);
if Theta_0>pi/4
warning('Output scattering angle larger than pi/4:Limit of the model')
end
e = sqrt( L / (N_diff*ls*k^2) );
w = sqrt(N_diff/2)*e / (px*Theta_0);
for j=1:N_diff
delta(:,:,j)=ThinDiffuser(e,w,N);
end
end