aboutsummaryrefslogtreecommitdiff
path: root/exemples/09_tutorial2D.pd
blob: 5de0ee6b5c82c7435c7728dae681ff109da84235 (plain)
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
#N canvas 57 28 600 601 12;
#N canvas 623 135 520 309 init 0;
#X msg 200 169 setK \$1;
#X msg 274 143 setD \$1;
#X msg 416 115 setM \$1;
#X floatatom 200 94 5 -10 200 0 - - -;
#X floatatom 274 92 5 0 0 0 - - -;
#X floatatom 416 92 5 0 0 0 - - -;
#X obj 416 143 s masse;
#X obj 200 143 / 10;
#X obj 200 117 + 1;
#X obj 274 116 / 10;
#X msg 200 67 100;
#X msg 274 68 25;
#X msg 416 66 50;
#X obj 49 50 loadbang;
#X floatatom 341 92 5 0 0 0 - - -;
#X obj 341 116 / 10;
#X msg 341 143 setD2 \$1;
#X msg 341 68 1;
#X obj 139 23 inlet;
#X obj 47 201 s tut_masse;
#X obj 200 201 s tut_lia;
#X msg 44 84 setXmin -3.8;
#X msg 58 110 setXmax 3.8;
#X msg 81 131 setYmin -3.8;
#X msg 95 157 setYmax 3.8;
#X connect 0 0 20 0;
#X connect 1 0 20 0;
#X connect 2 0 6 0;
#X connect 3 0 8 0;
#X connect 4 0 9 0;
#X connect 5 0 2 0;
#X connect 7 0 0 0;
#X connect 8 0 7 0;
#X connect 9 0 1 0;
#X connect 10 0 3 0;
#X connect 11 0 4 0;
#X connect 12 0 5 0;
#X connect 13 0 21 0;
#X connect 13 0 22 0;
#X connect 13 0 23 0;
#X connect 13 0 24 0;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 20 0;
#X connect 17 0 14 0;
#X connect 18 0 21 0;
#X connect 18 0 22 0;
#X connect 18 0 23 0;
#X connect 18 0 24 0;
#X connect 21 0 19 0;
#X connect 22 0 19 0;
#X connect 23 0 19 0;
#X connect 24 0 19 0;
#X restore 168 43 pd init;
#X obj 42 92 t b b;
#X obj 42 44 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 329 22 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 75 231 0 \, destroy;
#X obj 41 259 gemwin;
#X msg 41 206 reset \, create \, 1;
#N canvas 115 18 1382 984 structure 0;
#X obj 503 58 tut_lia;
#X obj 193 331 tut_lia;
#X obj 243 219 tut_lia;
#X obj 353 120 tut_lia;
#X obj 1022 465 tut_lia;
#X obj 791 778 tut_lia;
#X obj 910 681 tut_lia;
#X obj 997 574 tut_lia;
#X obj 988 236 tut_lia;
#X obj 746 55 tut_lia;
#X obj 907 142 tut_lia;
#X obj 1009 345 tut_lia;
#X obj 556 793 tut_lia;
#X obj 188 450 tut_lia;
#X obj 252 593 tut_lia;
#X obj 384 717 tut_lia;
#X obj 654 751 tut_lia;
#X obj 801 707 tut_lia;
#X obj 850 622 tut_lia;
#X obj 902 500 tut_lia;
#X obj 908 405 tut_lia;
#X obj 907 301 tut_lia;
#X obj 865 207 tut_lia;
#X obj 769 154 tut_lia;
#X obj 226 276 tut_masse -0.9 0.4;
#X obj 422 90 tut_masse -0.4 0.9;
#X obj 997 291 tut_masse 0.9 0.4;
#X obj 637 815 tut_masse 0 -1;
#X obj 972 633 tut_masse 0.7 -0.7;
#X obj 947 189 tut_masse 0.7 0.7;
#X obj 173 374 tut_masse -1 0;
#X obj 272 165 tut_masse -0.7 0.7;
#X obj 304 648 tut_masse -0.7 -0.7;
#X obj 837 97 tut_masse 0.4 0.9;
#X obj 207 520 tut_masse -0.9 -0.4;
#X obj 1015 400 tut_masse 1 0;
#X obj 445 758 tut_masse -0.4 -0.9;
#X obj 873 734 tut_masse 0.4 -0.9;
#X obj 598 28 tut_masse 0 1;
#X obj 1017 517 tut_masse 0.9 -0.4;
#X connect 0 0 25 0;
#X connect 0 1 38 0;
#X connect 1 0 30 0;
#X connect 1 1 24 0;
#X connect 2 0 31 0;
#X connect 2 1 24 0;
#X connect 3 0 31 0;
#X connect 3 1 25 0;
#X connect 4 0 39 0;
#X connect 4 1 35 0;
#X connect 5 0 27 0;
#X connect 5 1 37 0;
#X connect 6 0 37 0;
#X connect 6 1 28 0;
#X connect 7 0 28 0;
#X connect 7 1 39 0;
#X connect 8 0 29 0;
#X connect 8 1 26 0;
#X connect 9 0 38 0;
#X connect 9 1 33 0;
#X connect 10 0 33 0;
#X connect 10 1 29 0;
#X connect 11 0 26 0;
#X connect 11 1 35 0;
#X connect 12 0 36 0;
#X connect 12 1 27 0;
#X connect 13 0 30 0;
#X connect 13 1 34 0;
#X connect 14 0 34 0;
#X connect 14 1 32 0;
#X connect 15 0 32 0;
#X connect 15 1 36 0;
#X connect 16 0 38 0;
#X connect 16 1 27 0;
#X connect 17 0 25 0;
#X connect 17 1 37 0;
#X connect 18 0 31 0;
#X connect 18 1 28 0;
#X connect 19 0 24 0;
#X connect 19 1 39 0;
#X connect 20 0 30 0;
#X connect 20 1 35 0;
#X connect 21 0 34 0;
#X connect 21 1 26 0;
#X connect 22 0 32 0;
#X connect 22 1 29 0;
#X connect 23 0 36 0;
#X connect 23 1 33 0;
#X connect 24 0 1 1;
#X connect 24 0 2 1;
#X connect 24 0 19 0;
#X connect 25 0 0 0;
#X connect 25 0 3 1;
#X connect 25 0 17 0;
#X connect 26 0 8 1;
#X connect 26 0 11 0;
#X connect 26 0 21 1;
#X connect 27 0 5 0;
#X connect 27 0 12 1;
#X connect 27 0 16 1;
#X connect 28 0 7 0;
#X connect 28 0 6 1;
#X connect 28 0 18 1;
#X connect 29 0 8 0;
#X connect 29 0 10 1;
#X connect 29 0 22 1;
#X connect 30 0 1 0;
#X connect 30 0 13 0;
#X connect 30 0 20 0;
#X connect 31 0 2 0;
#X connect 31 0 3 0;
#X connect 31 0 18 0;
#X connect 32 0 15 0;
#X connect 32 0 14 1;
#X connect 32 0 22 0;
#X connect 33 0 10 0;
#X connect 33 0 9 1;
#X connect 33 0 23 1;
#X connect 34 0 13 1;
#X connect 34 0 14 0;
#X connect 34 0 21 0;
#X connect 35 0 4 1;
#X connect 35 0 11 1;
#X connect 35 0 20 1;
#X connect 36 0 12 0;
#X connect 36 0 15 1;
#X connect 36 0 23 0;
#X connect 37 0 5 1;
#X connect 37 0 6 0;
#X connect 37 0 17 1;
#X connect 38 0 0 1;
#X connect 38 0 9 0;
#X connect 38 0 16 0;
#X connect 39 0 4 0;
#X connect 39 0 7 1;
#X connect 39 0 19 1;
#X restore 417 325 pd structure;
#X obj 329 45 loadbang;
#X msg 244 270 force2D 0 2;
#X msg 190 295 force2D -2 0;
#X msg 247 322 force2D 0 -2;
#X msg 301 294 force2D 2 0;
#X obj 329 74 t b b b;
#X msg 380 99 reset;
#X msg 355 124 resetL;
#X msg 329 152 resetF;
#X obj 42 65 metro 50;
#X msg 54 150 force2D 0 -0.1;
#X obj 168 22 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 246 354 s tut_masse;
#X obj 42 178 s tut_masse;
#X obj 77 117 s tut_lia;
#X text 39 403 You can use this exemple to try to make you own structure.
;
#X text 58 506 Go to pd structure;
#X text 59 526 Remove everything;
#X text 41 427 look at the structure \, and look a the patch : a lia
is corespnding to a segment \, and a maase is a white sphere;
#X text 41 462 everyting is here to make a 2D structure easilly;
#X text 40 486 to make your own strucute :;
#X text 59 546 put "tut_masse" object in the screen where you want
to put your masse in the gem windows.;
#X text 58 658 create a "tut_lia" object for each link you whant to
put in the structure.;
#X text 60 726 The structure is ready. you should now do the initialisation
part :;
#X text 222 19 <- init;
#X text 375 20 <- reset;
#X text 59 763 click on pd init : this will give a minimal and maximal
position to the masse. (for them to stay on the screen).;
#X text 60 806 click on reset : this will tell the link to learn there
good initial lenght \, reset forces etc...;
#X text 59 584 when all masse are there \, you can specifie them ther
initial position : edit "tut_masse" object and add 2 float corresponding
to ther X and Y position in the GEM screen. (should be about from -4
to 4);
#X text 59 694 connect them to the masse (link and masses as to be
connected in 2 way : mass to link and link to mass).;
#X text 61 846 now \, you are ready for toggle the metro on...;
#X text 30 887 If the line does not display corectly \, you sould upgrade
GEM;
#X text 192 204 <- create;
#X connect 1 0 21 0;
#X connect 1 1 18 0;
#X connect 1 1 22 0;
#X connect 2 0 17 0;
#X connect 3 0 13 0;
#X connect 4 0 5 0;
#X connect 6 0 5 0;
#X connect 8 0 13 0;
#X connect 9 0 20 0;
#X connect 10 0 20 0;
#X connect 11 0 20 0;
#X connect 12 0 20 0;
#X connect 13 0 16 0;
#X connect 13 1 15 0;
#X connect 13 2 14 0;
#X connect 14 0 21 0;
#X connect 15 0 22 0;
#X connect 16 0 22 0;
#X connect 17 0 1 0;
#X connect 18 0 21 0;
#X connect 19 0 0 0;