d1=7.5;
d2=d1;
N=2;
M=2;
lumda=7.5;
k=2*pi/lumda;
[alpha,seta]=meshgrid(0:0.01:pi);
D=sin(k*M*d1/2*cos(alpha).*sin(seta)).*sin(k*M*d2/2*sin(alpha).*sin(seta))/M./sin(k*d1/2*cos(alpha).*sin(seta))/N./sin(k*d2/2*sin(alpha).*sin(seta));
mesh(alpha,seta,D)
xlabel('alpha');
ylabel('theta');
zlabel('D')