clear all;
clc;
N0=100;
r_med=[1];
sigma_g=7;
N_ang=91;
theta=1:1:181;
phi=1:1:360;
for i=1:length(r_med)
[P11(i,:),P12(i,:),P33(i,:),P34(i,:),~,~,~] = ZK_W_Cloud_PhaseFunc(N0,r_med(i),sigma_g,N_ang)
end
figure
hold on
[theta,phi]=meshgrid(theta,phi);
P122=P12(i,:).*cos(2*phi);
P(i,:)=P11(i,:)+P122(i,:);
x=P(i,:).*cos(phi).*sin(theta);
y=P(i,:).*sin(phi).*sin(theta);
z=P(i,:).*cos(theta);
plot3(x,y,z)
xlabel('X');ylabel('Y');zlabel('Z');