1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| // Création des six lignes modélisant le pont
var
Form1: TForm1;
t,z,etape,loop,q:integer;
x1,y1,l1,m1,a1,b1,c1,d1,e1,f1,g1,h1,w0,w1,w2,w3,w4,w5,b:integer;
mouvement:integer=0;
const
x0=180;
y0=397;
r=258;
l0=160;
m0=408;
r1=266;
a0=161;
b0=449;
r2=266;
c0=740;
d0=397;
r3=305;
e0=730;
f0=408;
r4=305;
g0=729;
h0=449;
r5=306;
//Permet de faire bouger chaque ligne du pont
implementation
uses Unit2, Unit3;
procedure tform1.timer1timer(sender:tobject);
begin
x1:=round(x0+r*cos(t));
y1:=round(y0+w0*sin(100));
moveto(x0,y0);
lineto(x1-z,y1-z);
l1:=round(l0+r1*cos(t));
m1:=round(m0+w1*sin(100));
moveto(l0,m0);
lineto(l1-z,m1-z);
a1:=round(a0+r2*cos(t));
b1:=round(b0+w2*sin(100));
moveto(a0,b0);
lineto(a1-z,b1-z);
c1:=round(c0+r3*-cos(t));
d1:=round(d0+w3*sin(100));
moveto(c0,d0);
lineto(c1+z,d1-z);
e1:=round(e0+r4*-cos(t));
f1:=round(f0+w4*sin(100));
moveto(e0,f0);
lineto(e1+z,f1-z);
g1:=round(g0+r5*-cos(t));
h1:=round(h0+w5*sin(100));
moveto(g0,h0);
lineto(g1+z,h1-z);
// Polygone représentant l'extrémité du pont
polygon([point(418,408),point(439,398),point(439,441),point(419,449)]); |
Partager