unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm1 = class(TForm) 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 i,x,R,lx,ly:integer; dx:real; procedure draww(x,y:integer); var rec:trect; a:real; my,mx:integer; begin a:=(x-lx)/R; my:=round(r*sin(a)); mx:=round(r*cos(a)); rec.Left:=x-r-1; rec.Top:=y-r-1; rec.Right:=x+r; rec.Bottom:=y+r+1; canvas.FillRect(rec); canvas.Ellipse(x-r,y-r,x+r,y+r); canvas.MoveTo(x+mx,y+my); canvas.LineTo(x-mx,y-my); canvas.MoveTo(x-my,y+mx); canvas.LineTo(x+my,y-mx); end; begin canvas.FillRect(canvas.ClipRect); lx:=40; ly:=150; R:=30; dx:=0.1; x:=lx; for i:=lx to 300 do begin x:=round(i); sleep(5); application.ProcessMessages; draww(x,ly); end; end; end.