m = 1;
for i1 = 1:230
for i2 = (i1+1):231
R12 = (HyM(1,i1)-HyM(1,i2))^2 + (HyM(2,i1)-HyM(2,i2))^2 + (HyM(3,i1)-HyM(3,i2))^2;
if R12 >100
for i3 = (i2+1):232
R23 = (HyM(1,i3)-HyM(1,i2))^2 + (HyM(2,i3)-HyM(2,i2))^2 + (HyM(3,i3)-HyM(3,i2))^2;
R13 = (HyM(1,i1)-HyM(1,i3))^2 + (HyM(2,i1)-HyM(2,i3))^2 + (HyM(3,i1)-HyM(3,i3))^2;
if R23>100 && R13>100
Norm3 = (HyM(1,i2) - HyM(1,i1))*(HyM(2,i3) - HyM(2,i1)) - (HyM(2,i2) - HyM(2,i1))*(HyM(1,i3) - HyM(1,i1));
Norm1 = (HyM(2,i2) - HyM(2,i1))*(HyM(3,i3) - HyM(3,i1)) - (HyM(2,i3) - HyM(2,i1))*(HyM(3,i2) - HyM(3,i1));
Norm2 = -(HyM(1,i2) - HyM(1,i1))*(HyM(3,i3) - HyM(3,i1)) + (HyM(1,i3) - HyM(1,i1))*(HyM(3,i2) - HyM(3,i1));
coss = abs(Norm3)/(Norm1^2 + Norm2^2 + Norm3^2)^0.5;
dist(m) = 3000/coss;
teta(m) = 180/3.14*acos(coss);
m = m+1;
end
end
end
end
end