Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
.
[graphlib.git] / chateaux / notes.txt
1 Données
2 -------
3
4 x0, y0  position initiale    
5 v0      vitesse initiale
6 alpha   angle de tir
7 g       constante de gravitation
8 k       coefficient de frottement
9 w       vitesse du vent
10
11 Variables
12 ---------
13
14 x(t)    composante x de la position à l'instant t
15 y(t)    composante y de la position à l'instant t
16
17 vx(t)   composante x de la vitesse à l'instant t
18 vy(t)   composante y de la vitesse à l'instant t
19
20 vrx(t)  composante x de la vitesse relative à l'instant t
21         = vx(t) - w
22 vry(t)  composante y de la vitesse relative à l'instant t
23         = vy(t)
24 |vr(t)| vitesse relative à l'instant t
25         = SQRT(vrx(t)^2 + vry(t)^2)
26
27 ax(t)   composante x de l'accélération à l'instant t
28 ay(t)   composante y de l'accélération à l'instant t
29
30 fx(t)   composante x de la force de frottement
31 fy(t)   composante y de la force de frottement
32
33 Initialisation
34 --------------
35
36 x(0)    = x0
37 y(0)    = y0
38
39 vx(0)   = v0 cos(alpha)
40 vy(0)   = v0 sin(alpha)
41
42 ax(0)   = 0
43 ay(0)   = 0
44
45 Mise à jour
46 -----------
47
48 x(t+1)  = x(t) + vx(t)
49 y(t+1)  = y(t) + vy(t)
50
51 vx(t+1) = vx(t) + ax(t)
52 vy(t+1) = vy(t) + ay(t)
53
54 fx(t)   = -k |vr(t)| vrx(t)
55         = -k |vr(t)| (vx(t) - w)
56         = -k SQRT((vx(t) - w)^2 + vy(t)^2) vx(t)
57 fy(t)   = -k vr(t) vry(y)
58         = -k vr(t) vy(t)
59         = -k SQRT((vx(t) - w)^2 + vy(t)^2) vy(t)
60
61 ax(t+1) = fx(t)
62         = -k SQRT((vx(t) - w)^2 + vy(t)^2) vx(t)
63 ay(t+1) = -g + fy(t)
64         = -g - k SQRT((vx(t) - w)^2 + vy(t)^2) vy(t)
65
66 Algorithme
67 ----------
68 Données
69         ax0     ax(t)
70         ay0     ay(t)
71         vx0     vx(t)
72         vy0     vy(t)
73         x0      x(t)
74         y0      y(t)
75
76 Résultats
77         ax1     ax(t+1)
78         ay1     ay(t+1)
79         vx1     vx(t+1)
80         vy1     vy(t+1)
81         x1      x(t+1)
82         y1      y(t+1)
83
84 Intermédiaires
85         kvr     - k × vr(t)
86
87 Algorithme
88         x1  <- x0 + v0
89         y1  <- y0 + v0
90         vx1 <- vx0 + ax0
91         vy1 <- vy0 + ay0
92         kvr <- k × SQRT((vx0 - w)^2 + vy0^2)
93         ax1 <- kvr × vx0
94         ay1 <- kvr × vy0 - g