Нейтрофилы
end;
writeln(f);
until j=98;
close(f);
end;
procedure write_distr;
var i, j, k : word;
z : word;
shift : array[0..35] of word;
f : text;
begin
assign(f,'dist_sp.txt');
rewrite(f);
for j:=0 to 35 do shift[j]:=0;
for i:=1 to 30 do
with cell[i] do
begin
for j:=2 to 100 do
begin
z:=round(sqrt((x[j]-x[j-1])*(x[j]-x[j-1])+(y[j]-y[j-1])*(y[j]-y[j-1])));
shift[z]:=shift[z]+1;
end;
end;
for j:=0 to 30 do writeln(f,j:3,shift[j]:10);
close(f);
end;
procedure draw_cell(c : cell_typ; x, y : real);
var
color, graph_x, graph_y : integer;
begin
case c of
slow : color:=lightcyan;
mean : color:=yellow;
fast : color:=white;
end;
graph_x:=round(x*n_pix_inline/2000);
graph_y:=round(y*n_line/2000);
putpixel(graph_x,graph_y,color);
end;
procedure draw_picture;
var
i,j : word;
begin
for i:=1 to 30 do
with cell[i] do
for j:=1 to 100 do
begin
draw_cell(speed,x[j],y[j]);
end;
end;
begin
randomize;
init;
make_all_steps;
speed_meas;
write_shift;
write_distr;
write_disp;
write_angle;
opengraph;
draw_picture;
key:=readkey;
closegraph;
end.