Procedure tform12. BitBtn1Click(Sender: tobject)


Download 0.64 Mb.
bet2/3
Sana05.06.2020
Hajmi0.64 Mb.
#115240
1   2   3
Bog'liq
chizma


tg(x)

var


y,x:integer;

xx,yy:real;

begin

Canvas.MoveTo(0,ClientHeight div 2);



Canvas.LineTo(ClientWidth,ClientHeight div 2);

Canvas.MoveTo(ClientWidth div 2 , 0);

Canvas.LineTo(ClientWidth div 2,ClientHeight);

Canvas.Pen.Color := clNavy;

Canvas.MoveTo(0,0);

for x:= 1 to ClientWidth do begin

xx := x * 4 * 3.1415 / ClientWidth;

yy := sin(xx)/cos(xx);

y := trunc(ClientHeight - (yy + 1) * (ClientHeight / 2));

// Pixels orqali chizish

Canvas.LineTo(x,y); sleep(9);

end;


end;



ctg(x)

var


y,x:integer;

xx,yy:real;

begin

Canvas.MoveTo(0,ClientHeight div 2);



Canvas.LineTo(ClientWidth,ClientHeight div 2);

Canvas.MoveTo(ClientWidth div 2 , 0);

Canvas.LineTo(ClientWidth div 2,ClientHeight);

Canvas.Pen.Color := clNavy;

Canvas.MoveTo(0,0);

for x:= 1 to ClientWidth do begin

xx := x * 4 * 3.1415 / ClientWidth;

yy := cos(xx)/sin(xx);

y := trunc(ClientHeight - (yy + 1) * (ClientHeight / 2));

// Pixels orqali chizish

Canvas.LineTo(x,y); sleep(9);

end;


end;



Download 0.64 Mb.

Do'stlaringiz bilan baham:
1   2   3




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling