Ich danke dir, ich hoffe mal das ich das nun korrekt umgesetzt habe.
Delphi-Quellcode:
implementation
{$R *.dfm}
var
r1: single;
r2: single;
n: integer = 6;
x, y: integer;
Phi: single;
procedure TForm1.FormPaint(Sender: TObject);
var k: Integer;
begin
Canvas.Brush.Color := Color;
Canvas.FillRect(ClientRect);
Canvas.Pen.Color := clGray;
Canvas.Ellipse(200-60, 200-60, 200+60, 200+60);
Canvas.Pen.Color := clRed;
Canvas.Brush.Color := clRed;
for k := 0 to n do
begin
x := round( cos(k * 2 * Pi / n + Phi) * (r1 - r2) );
y := round( sin(k * 2 * Pi / n + Phi) * (r1 - r2) );
Canvas.Ellipse(200+x-5,200+y-5,200+x+5,200+y+5);
end;
end;
procedure TForm1.Timer1Timer(Sender: TObject);
begin
if Phi < (2 * Pi) - 0.1 then Phi := Phi + 0.1 else Phi := 0.0;
invalidate;
end;
end.
Und es dreht sich doch...