
simp=dlmread('simp_test2d.txt');
vert=dlmread('vtx_test2d.txt');
arg_=[1, 100, 110, 75,75, 110,-1, 3]
matS_2=[];
[mat1_]=fantom_InNodes_v1(vert,simp,[],ones(size(vert)), arg_);
matS_2=[matS_2 ECT3D_FEMMatNodes2Simp(vert,simp,mat1_)];
z=20;
z1=5;
for i=1:100
    i
    z=z+0.5-(0.5-rand)*0.5;
    %perm=1;
    z1=z1+1-(0.5-rand)*0.5;
    arg_=[1, z, z1, 75, 75, z1, -1, perm]
    %z1 wysokosc walca wewnatrz bazy
    %perm wartosc permittivity
    %z rozmiar walca wewnatrz --> 75+60 dla z=60 
    
    mat1=fantom_InNodes_v1(vert,simp,[],mat1_, arg_);
    matS_2=[matS_2 ECT3D_FEMMatNodes2Simp(vert,simp,mat1)];
%trisurf(simp,vert(:,1),vert(:,2),vert(:,3),matS_2);
    
    %kk=input('?');
end

%1; 50; 110; 75;  110;  -1; 1