procedure TForm1.Timer1Timer(Sender: TObject); begin with image1.Canvas do begin Brush.Color := ClWhite; FillRect(Canvas.ClipRect); pen.Color:=cl1; pen.Width:=w1; moveto(x0,y1); lineto(x0+round(L1*cos(SecondOf(now)*6*pi/180-pi/2)),y1+round(L1*sin(SecondOf(now)*6*pi/180-pi/2))); pen.Width:=w2; moveto(x0,y1); lineto(x0+round(L2*cos(MinuteOf(now)*6*pi/180-pi/2)),y1+round(L2*sin(MinuteOf(now)*6*pi/180-pi/2))); pen.Width:=w3; moveto(x0,y1); lineto(x0+round(L3*cos(HourOf(now)*15*pi/180-pi/2)),y1+round(L3*sin(HourOf(now)*15*pi/180-pi/2))); end; end;
procedure TForm1.FormCreate(Sender: TObject); begin w:=2*pi/(T0*0.001);; end;
procedure TForm1.Timer2Timer(Sender: TObject); var x,y:integer; f:real; begin with image2.Canvas do begin x:=round(A*sin(w*t*0.01)); y:=round(sqrt(L4*L4-x*x)); f:=arctan(x/y);
Brush.Color := ClWhite; FillRect(Canvas.ClipRect); pen.Color:=cl4; brush.Color:=cl4; pen.Width:=w4; MoveTo(x0+round(L40*sin(f{-pi/2})),y4+round(L40*cos(f{-pi/2}))); LineTo(x0+x,y4+y); pie(x0+x-r,y4+y-r,x0+x+r,y4+y+r,0,0,0,0); end; inc(t); if t=t0 then t:=0; end;