x2
var x,y: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);
x:=-99;
while x<=99 do begin
y:=x*x;
canvas.LineTo(trunc(50*x+ClientWidth div 2),trunc(-15*y+ClientHeight div 2)); x:=x+0.5;
end;
3*x+7
var x,y: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);
x:=-120;
while x<=120 do begin
y:=3*x+7;
canvas.LineTo(trunc(50*x+ClientWidth div 2),trunc(-15*y+ClientHeight div 2)); x:=x+0.5;
end;
end;
Do'stlaringiz bilan baham: |