Модератор: Модераторы
x := x0 + r*cos(t);
y := y0 + r*sin(t);
Снег Север писал(а):t - время
--- unit1.pas
+++ unit1.pas
@@ -27,6 +27,7 @@ type
var
Form1: TForm1;
+ l:Integer=100;
implementation
@@ -39,8 +40,17 @@ var
x, y : single;
begin
a:=a+pi/45;
- x:=cos(a)*100;
- y:=sin(a)*100;
+ x:=cos(a)*l;
+ y:=sin(a)*l;
+ if l>Shape2.Width div 2 then
+ dec(l)
+ else
+ begin
+ Shape2.Width:=Shape2.Width+10;
+ Shape2.Left:=Shape2.Left-5;
+ Shape2.Height:=Shape2.Height+10;
+ Shape2.Top:=Shape2.Top-5;
+ end;
Shape1.Left := round(x) + (Shape2.Left+Shape2.Width div 2)-Shape1.Width div 2;
Shape1.Top := round(y) + (Shape2.Top+Shape2.Height div 2)-Shape1.Height div 2;
end;
Сейчас этот форум просматривают: Yandex [Bot] и гости: 220