Изучение методов визуального программирования в Delphi. Задание: Построить графики функций ; ; Текст программы: unit Graph; interface uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, TeEngine, Series, ExtCtrls, TeeProcs, Chart; type TForm1 = class(TForm) Edit1: TEdit; Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; Edit5: TEdit; Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel; Label5: TLabel; Chart1: TChart; Series1: TLineSeries; Series2: TLineSeries; Series3: TLineSeries; Button1: TButton; procedure Button1Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form1: TForm1; implementation {$R *. DFM} procedure TForm1. Button1Click(Sender: TObject); VAR T0, TK, Q, W, Y1, Y2, Y3 : REAL; i, H : real; begin Q: =StrToFloat(Edit1. Text); W: =strToFloat(Edit2. Text); H: =StrToFloat(Edit3. Text); T0: =StrToFloat(Edit4. Text); TK: =StrToFloat(Edit5. Text); i: =T0; Series1. Clear; Series2. Clear; Series3. Clear; while i begin Y1: =exp(-Q*i)*sin(W*i); Y2: =-exp(-Q*i); Y3: =exp(-Q*i); Series1. AddXY(i, Y1, '', clTeeColor); Series2. AddXY(i, Y2, '', clTeeColor); Series3. AddXY(i, Y3, '', clTeeColor); i: =i+h; end; end; end. Внешний вид приложения: