L
lcl_003
Unregistered / Unconfirmed
GUEST, unregistred user!
我用timer画正弦曲线,但是不知道如何控制画几个周期。比如我只想画两个周期?
procedure TForm1.Timer1Timer(Sender: TObject);
var
x,j:integer;
begin
for x:=0 to 10 do
begin
series1.AddXY(i,10*Sin(i/8-1)+30);
i:=I+0.5;
end;
if series1.Count>300 then
series1.Clear;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
var
x,j:integer;
begin
for x:=0 to 10 do
begin
series1.AddXY(i,10*Sin(i/8-1)+30);
i:=I+0.5;
end;
if series1.Count>300 then
series1.Clear;
end;