aboutsummaryrefslogtreecommitdiff
path: root/examples/61_draw_link_force_2d.pd
blob: e494b563e4041ece1fbd15a2239c0b5b7fef3f8b (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
#N canvas 619 338 876 550 10;
#X declare -lib Gem;
#X obj 30 174 until;
#X obj 30 244 - 100;
#X obj 30 198 f;
#X obj 58 198 + 1;
#X obj 30 152 t f b;
#X msg 74 174 0;
#X msg 361 148 reset;
#X obj 319 128 t b b b;
#X obj 319 272 s \$0-msd;
#X obj 36 352 r \$0-msd;
#X obj 30 264 / 100;
#X floatatom 128 152 5 0 0 0 - - -;
#X obj 30 218 t f f;
#N canvas 0 0 450 300 (subpatch) 0;
#X array force 200 float 2;
#X coords 0 1 200 -1 200 140 1;
#X restore 303 345 graph;
#X obj 30 284 * 1;
#X text 167 152 link length;
#X text 65 133 draw;
#X obj 30 75 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 30 98 t b b;
#X msg 30 132 200;
#X obj 28 399 route massesForcesId;
#X obj 28 420 route 1;
#X msg 319 228 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1;
#X msg 336 247 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3;
#X obj 28 378 pmpd2d;
#X msg 341 174 mass M1 0 1 0 0;
#X msg 350 193 mass M2 1 1 0 0;
#X obj 671 225 table test 100;
#X msg 28 440 \$1;
#X obj 670 247 table null 100;
#X msg 492 202 tabLink test M1 M2 test 1 null 1;
#X text 36 26 This abstraction help to draw link forces regarding to
it's elongation / elongation speed;
#X msg 28 308 pos M2 0 0 \, bang \, pos M2 \$1 0 \, bang \, get massesForces
M2;
#X obj 28 460 tabwrite force;
#X obj 538 38 declare -lib Gem;
#X connect 0 0 2 0;
#X connect 1 0 10 0;
#X connect 2 0 3 0;
#X connect 2 0 12 0;
#X connect 3 0 2 1;
#X connect 4 0 0 0;
#X connect 4 1 5 0;
#X connect 5 0 2 1;
#X connect 6 0 8 0;
#X connect 7 0 30 0;
#X connect 7 0 22 0;
#X connect 7 0 23 0;
#X connect 7 1 25 0;
#X connect 7 1 26 0;
#X connect 7 2 6 0;
#X connect 9 0 24 0;
#X connect 10 0 14 0;
#X connect 11 0 14 1;
#X connect 12 0 1 0;
#X connect 12 1 33 1;
#X connect 14 0 32 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 18 1 7 0;
#X connect 19 0 4 0;
#X connect 20 0 21 0;
#X connect 21 0 28 0;
#X connect 22 0 8 0;
#X connect 23 0 8 0;
#X connect 24 0 20 0;
#X connect 25 0 8 0;
#X connect 26 0 8 0;
#X connect 28 0 33 0;
#X connect 32 0 24 0;