请问用什么组件?
或者有什么API函数可以直接作图的?请帮帮我吧,我正在做毕业设计呢,急死我了~~

解决方案 »

  1.   

    比如画 Y = SinX
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm1 = class(TForm)
        procedure FormPaint(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormPaint(Sender: TObject);
    var
      CenterX,CenterY:integer;
      X,Y:integer;
      YScale:integer;
      i : integer;
      Alpha:Real;
    begin
      CenterX := ClientWidth div 2;
      CenterY := ClientHeight div 2;
      YScale := CenterY;
      for i := - 180 to 180 do
      begin
       if i = 0 then Alpha := 0
       else
         Alpha := i * pi / 180;
       Y := Round(Sin(Alpha) * YScale);
       Canvas.Pixels[CenterX + i,CenterY + Y] := clBlack;
      end;  
    end;end.
      

  2.   

    Y = SinX;unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs;type
      TForm1 = class(TForm)
        procedure FormPaint(Sender: TObject);
      private
        { Private declarations }
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormPaint(Sender: TObject);
    var
      CenterX,CenterY:integer;
      X,Y:integer;
      YScale:integer;
      i : integer;
      Alpha:Real;
    begin
      CenterX := ClientWidth div 2;
      CenterY := ClientHeight div 2;
      YScale := CenterY;
      for i := - 180 to 180 do
      begin
       if i = 0 then Alpha := 0
       else
         Alpha := i * pi / 180;
       Y := Round(Sin(Alpha) * YScale);
       Canvas.Pixels[CenterX + i,CenterY + Y] := clBlack;
      end;  
    end;end.
      

  3.   


    huh,I find that TeeChart may be the most appropriate component to display waving data...
    Thank you for your answer. : )