clear all;clc;
n=7;% 7 satellite beam
i=1;
beam_radius=36000*1e3*tan(0.15*pi/180); %satellite beam width
% method 1
t=linspace(0,2*pi,n);
x=cos(t+pi/6)*sqrt(3)*beam_radius;
y=sin(t+pi/6)*sqrt(3)*beam_radius;
% method 2 contains center beam point in [0 0]
beam0_pos=[0,0];
beam1_pos=[0,sqrt(3)*beam_radius];
c=cosd(60);
s=sind(60);
temp=zeros(6,2);
temp(1,:)=beam1_pos;
for i=2:6
temp(i,1)=temp(i-1,1)*c-temp(i-1,2)*s;
temp(i,2)=temp(i-1,1)*s+temp(i-1,2)*c;
end
beam_pos(1,:)=beam0_pos;
beam_pos(2:7,:)=temp;
c=temp(:,1);
d=temp(:,2);
plot(x,y,'r',c,d,'g');
axis equal;