Procedure tform12. BitBtn1Click(Sender: tobject)
Download 0.64 Mb.
|
chizma
Sin(x) procedure TForm12.BitBtn1Click(Sender: TObject); 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 * 8 * 3.1415 / ClientWidth; yy := sin(xx); y := trunc(ClientHeight - (yy + 1) * (ClientHeight / 2)); Canvas.LineTo(x,y); sleep(9); end; end;
Cos(x) procedure TForm13.BitBtn1Click(Sender: TObject); var x,y: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 * 8 * 3.1415 / ClientWidth; yy := cos(xx); y:=trunc(ClientHeight - (yy + 1) * ClientHeight / 2); // LineTo orqali chizish afzal Canvas.LineTo(x,y); sleep(9); end;
end; Download 0.64 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling