W windyhero Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-03 #1 如何画一条抛物线,如 Y=X**2+2*x-3,以及用DBChart做图形分析
J JohnsonGuo Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-03 #2 取一个区间[a,b],把区间等分为若干段每段取一个点,计算其对应y值,然后连接(x,y)就可以啦.
W windyhero Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-03 #4 我从来没有做过这方面的问题,对DBChart一窍不通
小 小虫子:P Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-03 #5 procedure TForm1.Button1Click(Sender: TObject); var x,y:integer; begin for x:= 0 to 500 do begin y:=x*x+x*2+3; form1.Canvas.LineTo (x,y); end; end;
procedure TForm1.Button1Click(Sender: TObject); var x,y:integer; begin for x:= 0 to 500 do begin y:=x*x+x*2+3; form1.Canvas.LineTo (x,y); end; end;
J JohnsonGuo Unregistered / Unconfirmed GUEST, unregistred user! 2002-12-03 #9 在DBChart1中添加一个折线图序列,然后使用以下代码即可. const n = 20; var i: Integer; a, b, x, y, step: Extended; begin a := -5; b := 3; step := (b - a) / n; for i := 0 to n do begin x := a + i * step; y := Sqr(x) + 2 * x - 3; DBChart1.Series[0].Add end; end;
在DBChart1中添加一个折线图序列,然后使用以下代码即可. const n = 20; var i: Integer; a, b, x, y, step: Extended; begin a := -5; b := 3; step := (b - a) / n; for i := 0 to n do begin x := a + i * step; y := Sqr(x) + 2 * x - 3; DBChart1.Series[0].Add end; end;