program anti3;
(* antibiogramma *)
uses crt,graph;
var c2,c3,c4,c5,c6,c7,c15:integer;

procedure grafica;
var t,s:integer;
    stringa:string;
begin
t:=0;
s:=0;
stringa:=('c:\scheda\');
initgraph(s,t,stringa);
end;


procedure pausa1;
begin
setcolor(c4);
outtextxy(430,10,'premi INVIO');readln;
setcolor(0);
outtextxy(430,10,'premi INVIO');
setcolor(c15);
end;

procedure pausa;
begin
readln;cleardevice;
end;

procedure testo(x,y:integer;st:string);
begin
outtextxy(x,y,st);
end;

procedure alone1;
begin
circle(150,150,50);circle(250,150,50);
circle(150,250,50);circle(250,250,50);
testo(50,410,'diffusione degli antibiotici nello stesso tempo');
pausa1;
setfillstyle(2,c3);
fillellipse(150,150,40,40);
fillellipse(250,150,20,20);
fillellipse(150,250,30,30);
fillellipse(250,250,10,10);
testo(150,150,'A1');testo(250,150,'A2');
testo(150,250,'A3');testo(250,250,'A4');
setcolor(c2);
testo(50,420,'potere di inibizione sulla colonia batterica');
testo(50,430,'proporzionale ad alone attorno ad ogni antibiotico');
end;

procedure alone2;
begin
circle(150,150,50);circle(250,150,50);
circle(150,250,50);circle(250,250,50);
testo(50,410,'diffusione degli antibiotici nello stesso tempo');
pausa1;
setfillstyle(2,c3);
fillellipse(150,150,10,10);
fillellipse(250,150,40,40);
fillellipse(150,250,30,30);
fillellipse(250,250,20,20);
testo(150,150,'A1');testo(250,150,'A2');
testo(150,250,'A3');testo(250,250,'A4');
setcolor(c2);
testo(50,420,'potere di inibizione sulla colonia batterica');
testo(50,430,'proporzionale ad alone attorno ad ogni antibiotico');
end;

procedure spiega1;
begin
testo(400,100,'batterio ceppo A sensibile');
testo(400,120,'agli antibiotici ');
testo(400,140,'in ordine crescente');
testo(400,160,'A4 < A2 < A3 < A1');
end;

procedure spiega2;
begin
testo(400,100,'batterio ceppo B sensibile');
testo(400,120,'agli antibiotici ');
testo(400,140,'in ordine crescente');
testo(400,160,'A1 < A4 < A3 < A2');
end;

procedure pro1(s:string);
begin
setfillstyle(1,c7);
fillellipse(200,200,150,150);
testo(50,400,'colonia batterica ceppo '+s);pausa1;
alone1;spiega1;pausa1;
end;

procedure pro2(s:string);
begin
setfillstyle(1,c7);
fillellipse(200,200,150,150);
testo(50,400,'colonia batterica ceppo '+s);pausa1;
alone2;spiega2;pausa1;
end;

procedure scelta;
var sce:integer;
begin
cleardevice;
pro1('A');cleardevice;
pro2('B');
setcolor(c15);settextstyle(0,0,1);
testo(20,30,'per continuare premi 1..per finire 2 :scelta=');
gotoxy(60,2);readln(sce);
cleardevice;
if sce=1 then scelta;
end;


begin
clrscr;
c2:=2;c3:=3;c4:=4;c5:=5;c6:=6;c7:=7;c15:=15;
textcolor(c3);
writeln('misura potere antibiotico ');
writeln('premi INVIO');readln;clrscr;
grafica;
scelta;closegraph;
end.

ritorna