clc;
clear;
%定义球半径
R=4;
R_0=15;
R_j=10^5;
n=100;
fai=0:(pi/2)/n:pi/2;
% fai_3dB=1/36;
theta=0:2*pi/n:pi;
theta_3dB=1/36;
[theta,fai]=meshgrid(theta,fai);
% R_t=(1+1.656*fai.^2/fai_3dB^2).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
R_t=cos(fai).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
[x,y,z]=sph2cart(theta,fai,R_t);
surf(x,y,z)
% surf(x+0,y+2*sqrt(3)/3,z)
% hold on
% surf(x-1,y+sqrt(3)/3,z)
% hold on
% surf(x+1,y+sqrt(3)/3,z)
hold on
fai=0:(pi/2)/n:pi/2;
% fai_3dB=1/36;
theta=-pi:2*pi/n:0;
theta_3dB=1/36;
[theta,fai]=meshgrid(theta,fai);
%R_t=(1+1.656*fai.^2/fai_3dB^2).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
R_t=cos(fai).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
[x,y,z]=sph2cart(theta,fai,R_t);
surf(x,y,z)
clear;
%定义球半径
R=4;
R_0=15;
R_j=10^5;
n=100;
fai=0:(pi/2)/n:pi/2;
% fai_3dB=1/36;
theta=0:2*pi/n:pi;
theta_3dB=1/36;
[theta,fai]=meshgrid(theta,fai);
% R_t=(1+1.656*fai.^2/fai_3dB^2).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
R_t=cos(fai).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
[x,y,z]=sph2cart(theta,fai,R_t);
surf(x,y,z)
% surf(x+0,y+2*sqrt(3)/3,z)
% hold on
% surf(x-1,y+sqrt(3)/3,z)
% hold on
% surf(x+1,y+sqrt(3)/3,z)
hold on
fai=0:(pi/2)/n:pi/2;
% fai_3dB=1/36;
theta=-pi:2*pi/n:0;
theta_3dB=1/36;
[theta,fai]=meshgrid(theta,fai);
%R_t=(1+1.656*fai.^2/fai_3dB^2).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
R_t=cos(fai).*(1+1.656*theta.^2/theta_3dB^2)*R_0;
[x,y,z]=sph2cart(theta,fai,R_t);
surf(x,y,z)