f1x = table2array(readtable('wsf2x.csv'));
f1y = table2array(readtable('wsf2y.csv'));
f1z = table2array(readtable('wsf2z.csv'));
f2x = table2array(readtable('wsf1x.csv'));
f2y = table2array(readtable('wsf1y.csv'));
f2z = table2array(readtable('wsf1z.csv'));
n = 35;

initx1=zeros(1,35);
inity1=zeros(1,35);
initz1=zeros(1,35);
finalx1=zeros(1,35);
finaly1=zeros(1,35);
finalz1=zeros(1,35);

initx=zeros(1,35);
inity=zeros(1,35);
initz=zeros(1,35);
finalx=zeros(1,35);
finaly=zeros(1,35);
finalz=zeros(1,35);
scatter3(0,0,0,0.1)
for i = 1:35
    initx1(i) = 2+(i-1)*40/n;
    initz1(i) = 75;
    inity1(i) = 22-abs(i-18)*20/17;
    finalx1(i)=5+3*mod(i-1,7);
    finalz1(i)= 75+3*fix((i-1)/7);
    finaly1(i)=finalz1(i)-15;
    initx(i) = 15+3*mod(i-1,7);
    initz(i) = 75+3*fix((i-1)/7);
    inity(i) = initz(i)+5;
    psai = 2*pi*i/35;
    finalx(i) = 120+10*cos(psai);
    finaly(i) = 80+10*sin(psai);
    finalz(i) = 50;
    
end
for i = 1:35

    x2 = f2x(i,:);
    y2 = f2y(i,:);
    z2 = f2z(i,:);
    scatter3(x2,y2,z2,1)
    hold on
end


for i = 1:n
    %drawflighter1(initx(i),inity(i),initz(i),0,0,0.7,50,[1 0.2510 0.2510])
    %drawflighter1(finalx(i),finaly(i),finalz(i),0,0,0.7,50,[1 0.2510 0.2510])
    drawflighter1(initx1(i),inity1(i),initz1(i),0,pi/2,0.7,50,[1 0.2510 0.2510])
    drawflighter1(finalx1(i),finaly1(i),finalz1(i),0,pi/2,0.7,50,[1 0.2510 0.2510])
    hold on
end

count1 = 0;
for i = 1:35

    x1 = f1x(i,:);
    y1 = f1y(i,:);
    z1 = f1z(i,:);
    %scatter3(x1,y1,z1,0.5)
    hold on
end
[X,Y,Z] = sphere;
r = 5;
X2 = X * r;
Y2 = Y * r;
Z2 = Z * r;
%surf(X2+55,Y2+80,Z2+65)
hold on
xlabel('x方向         单位：米');
ylabel('y方向         单位：米');
zlabel('z方向         单位：米');
