udelal jsem to trochu jinak ale dik za pomoc :D
Program sinus;
uses Graph,Crt;
var i,gd,gd,PolX,PolY:integer;
K1,K2,x,Sirka,Vyska:real;
begin
clrscr;
Sirka:=4*pi;
Vyska:=4;
InitGraph(gd,gm,'');
PolX:=GetMaxX div 2;
PolY:=GetMaxY div 2;
line(0,PolY,GetMaxX,PolY);
line(PolX,0,PolX,GetMaxY);
OutTextXY(GetMaxX-10,PolY+3,'x');
OutTextXY(PolX+5,1,'y');
K1:=Sirka/GetMaxX;
K2:=GetMaxY/Vyska;
for i:=0 to GetMaxX do
begin
x:=(i-PolX)*K1;
putpixel(i,PolY-trunc(sin(x)*K2),lightblue);
putpixel(i,PolY-trunc(2*sin(x)*K2),lightred);
putpixel(i,PolY-trunc(sin(x/2)*K2),magenta);
putpixel(i,PolY-trunc(sin(2*x)*K2),lightgreen);
end;
SetTextStyle(0,0,2);
SetColor(lightblue);
OutTextXY(20,810,'y=sin(x)');
SetColor(lightred);
OutTextXY(20,830,'y=2*sin(x)');
SetColor(magenta);
OutTextXY(20,850,'y=sin(x/2)');
SetColor(lightgreen);
OutTextXY(20,870,'y=sin(2*x)');
writeln('Pro ukonceni stiskni cokoliv');
readln;
closegraph;
end.