So habe ich die Kugel programmiert, die soll wieder an den Anfang:
Delphi-Quellcode:
procedure TForm2.FormCreate(Sender: TObject);
begin
x:=20;y:=100;
v_x:=20;
v_y:=15;
[21:41:24] Jonas: procedure TForm2.Timer1Timer(Sender: TObject);
begin
with image3.Canvas do begin
brush.Color:=clwhite;
pen.Color:=clwhite;
image3.Width:=1057;
image3.Height:=553;
rectangle(0,0,image3.Width,image3.Height);
brush.Color:=clred;
pen.Color:=clred;
[21:42:02] Jonas: x:=x+v_x;
y:=y+v_y ;
ellipse(x,y,x+10,y+10);
end;