aboutsummaryrefslogtreecommitdiff
path: root/msd/utils/draw_link_force.pd
blob: 514b8a85506a938d792057fb3d8fb2e6b94d739c (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
#N canvas 520 143 684 479 10;
#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 374 173 reset;
#X obj 335 153 t b b b;
#X obj 30 327 msd;
#X obj 335 287 s \$0-msd;
#X obj 150 277 r \$0-msd;
#X obj 335 134 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X obj 30 264 / 100;
#X floatatom 128 152 5 0 0 0 - - -;
#X obj 30 218 t f f;
#X obj 30 390 tabwrite force;
#X msg 354 199 mass M1 0 1 0;
#X obj 30 348 route massesForcesId;
#X obj 30 370 route M2;
#N canvas 0 0 450 300 (subpatch) 0;
#X array force 200 float 3;
#A 0 0.123457 0.126247 0.129132 0.132118 0.135208 0.138408 0.141723
0.145159 0.148721 0.152416 0.15625 0.160231 0.164366 0.168663 0.17313
0.177778 0.182615 0.187652 0.192901 0.198373 0.204082 0.21004 0.216263
0.222767 0.229568 0.236686 0.244141 0.251953 0.260146 0.268745 0.277778
0.287274 0.297265 0.307787 0.318878 0.330579 0.342936 0.355999 0.369823
0.384468 0.4 0.416493 0.434028 0.452694 0.47259 0.493827 0.516529 0.540833
0.566893 0.594884 1.225 0.57 0.54 0.51 0.48 0.45 0.42 0.39 0.36 0.33
0.3 0.27 0.24 0.21 0.18 0.15 0.12 0.09 0.0599999 0.03 0 -0.0300001
-0.06 -0.09 -0.12 -0.15 -0.18 -0.21 -0.24 -0.27 -0.3 -0.33 -0.36 -0.39
-0.42 -0.45 -0.48 -0.51 -0.54 -0.57 -0.6 -0.63 -0.66 -0.69 -0.72 -0.75
-0.78 -0.81 -0.84 -0.87 0 0.87 0.84 0.81 0.78 0.75 0.72 0.69 0.66 0.63
0.6 0.57 0.54 0.51 0.48 0.45 0.42 0.39 0.36 0.33 0.3 0.27 0.24 0.21
0.18 0.15 0.12 0.09 0.06 0.0300001 0 -0.03 -0.0599999 -0.09 -0.12 -0.15
-0.18 -0.21 -0.24 -0.27 -0.3 -0.33 -0.36 -0.39 -0.42 -0.45 -0.48 -0.51
-0.54 -0.57 -1.225 -0.594884 -0.566893 -0.540833 -0.516529 -0.493827
-0.47259 -0.452694 -0.434028 -0.416493 -0.4 -0.384468 -0.369823 -0.355999
-0.342936 -0.330579 -0.318878 -0.307787 -0.297265 -0.287274 -0.277778
-0.268745 -0.260146 -0.251953 -0.244141 -0.236686 -0.229568 -0.222767
-0.216263 -0.21004 -0.204082 -0.198373 -0.192901 -0.187652 -0.182615
-0.177778 -0.17313 -0.168663 -0.164366 -0.160231 -0.15625 -0.152416
-0.148721 -0.145159 -0.141723 -0.138408 -0.135208 -0.132118 -0.129132
-0.126247;
#X coords 0 1 200 -1 200 140 1;
#X restore 331 318 graph;
#X msg 30 304 posX M2 \$1 \, bang \, get massesForces M2;
#X obj 30 284 * 1;
#X text 167 152 link length;
#X text 360 132 reset;
#X text 65 133 draw;
#X msg 363 218 mass M2 1 1 0;
#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 337 243 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1;
#X msg 354 262 link test2 M1 M2 3 0 1 0 0.5 \, setL test2 0.3;
#X msg 30 132 200;
#X text 31 9 This abstraction help to draw link forces regarding to
it's elongation;
#X connect 0 0 2 0;
#X connect 1 0 12 0;
#X connect 2 0 3 0;
#X connect 2 0 14 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 9 0;
#X connect 7 0 28 0;
#X connect 7 0 29 0;
#X connect 7 1 16 0;
#X connect 7 1 25 0;
#X connect 7 2 6 0;
#X connect 8 0 17 0;
#X connect 10 0 8 0;
#X connect 11 0 7 0;
#X connect 12 0 21 0;
#X connect 13 0 21 1;
#X connect 14 0 1 0;
#X connect 14 1 15 1;
#X connect 16 0 9 0;
#X connect 17 0 18 0;
#X connect 18 0 15 0;
#X connect 20 0 8 0;
#X connect 21 0 20 0;
#X connect 25 0 9 0;
#X connect 26 0 27 0;
#X connect 27 0 30 0;
#X connect 27 1 11 0;
#X connect 28 0 9 0;
#X connect 29 0 9 0;
#X connect 30 0 4 0;