aboutsummaryrefslogtreecommitdiff
path: root/examples/68_2d_hinge.pd
blob: ea1285fe7f0104b394488ef15a02c3f31d1fc3e0 (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
#N canvas 640 304 796 716 10;
#X msg 99 332 setK hinge \$1;
#X msg 129 384 setD hinge \$1;
#X floatatom 99 308 5 0 0 0 - - -;
#X floatatom 129 361 5 0 0 0 - - -;
#N canvas 986 544 784 467 gemrender 0;
#X obj 48 243 translateXYZ;
#X obj 48 269 sphere 0.1;
#X obj 127 24 inlet;
#X obj 559 12 inlet;
#X obj 475 232 curve 2;
#X msg 631 81 \$4 \$5 0;
#X msg 559 77 \$2 \$3 0;
#X obj 559 105 t b a;
#X obj 127 102 unpack f f f;
#X obj 166 128 t b f;
#X msg 48 150 0;
#X obj 48 117 loadbang;
#X obj 48 177 gemhead;
#X msg 475 160 0;
#X obj 475 127 loadbang;
#X obj 475 187 gemhead;
#X obj 559 42 t a a;
#X obj 127 45 route fix mvt;
#X obj 235 233 translateXYZ;
#X obj 235 259 sphere 0.1;
#X obj 314 92 unpack f f f;
#X obj 353 118 t b f;
#X msg 235 140 0;
#X obj 235 107 loadbang;
#X obj 235 167 gemhead;
#X obj 48 211 color 1 0 0;
#X connect 0 0 1 0;
#X connect 2 0 17 0;
#X connect 3 0 16 0;
#X connect 5 0 4 2;
#X connect 6 0 7 0;
#X connect 7 0 15 0;
#X connect 7 1 4 1;
#X connect 8 1 9 0;
#X connect 8 2 0 2;
#X connect 9 0 12 0;
#X connect 9 1 0 1;
#X connect 10 0 12 0;
#X connect 11 0 10 0;
#X connect 12 0 25 0;
#X connect 13 0 15 0;
#X connect 14 0 13 0;
#X connect 15 0 4 0;
#X connect 16 0 6 0;
#X connect 16 1 5 0;
#X connect 17 0 8 0;
#X connect 17 1 20 0;
#X connect 18 0 19 0;
#X connect 20 1 21 0;
#X connect 20 2 18 2;
#X connect 21 0 24 0;
#X connect 21 1 18 1;
#X connect 22 0 24 0;
#X connect 23 0 22 0;
#X connect 24 0 18 0;
#X connect 25 0 0 0;
#X restore 31 630 pd gemrender;
#X obj 154 628 print;
#X msg 42 47 0 \, destroy;
#X msg 32 23 reset \, create \, 1;
#X msg 232 446 setL hinge \$1;
#X floatatom 232 364 5 0 0 0 - - -;
#X msg 31 146 reset \, mass fix 0 1 -1 0 \, mass fix 0 1 1 0 \, mass
mvt 1 1 3 1 \, hinge hinge 0 1 2 0.1 0.1 \, link L 1 0 0.5 0.3 \, link
L 1 2 0.5 0.3;
#X msg 42 195 reset \, mass fix 0 1 -1 0 \, mass mvt 1 1 1 0 \, mass
mvt 1 1 3 1 \, hinge hinge 0 1 2 0.1 0.1 \, link L 1 0 0.5 0.3 \, link
L 1 2 0.5 0.3;
#X msg 56 244 reset \, mass mvt 1 1 -1 0 \, mass mvt 1 1 1 0 \, mass
mvt 1 1 3 1 \, hinge hinge 0 1 2 0.1 0.1 \, link L 1 0 0.5 0.3 \, link
L 1 2 0.5 0.3;
#X msg 46 550 bang \, massPos \, linkEnd L;
#X obj 31 604 route massPos linkEnd;
#X obj 32 69 gemwin 50;
#X obj 31 123 loadbang;
#X text 197 16 hing links allow to connect 3 masses in order to force
an angle between them;
#X text 410 157 1 moving mass;
#X text 429 205 2 moving masses;
#X text 445 257 3 moving masses;
#X obj 46 530 gemhead 66;
#X obj 31 576 ../pmpd2d;
#X obj 232 393 / 360;
#X obj 232 417 * 6.28;
#X text 282 361 angle (in degree);
#X connect 0 0 22 0;
#X connect 1 0 22 0;
#X connect 2 0 0 0;
#X connect 3 0 1 0;
#X connect 6 0 15 0;
#X connect 7 0 15 0;
#X connect 8 0 22 0;
#X connect 9 0 23 0;
#X connect 10 0 22 0;
#X connect 11 0 22 0;
#X connect 12 0 22 0;
#X connect 13 0 22 0;
#X connect 14 0 4 0;
#X connect 14 1 4 1;
#X connect 14 2 5 0;
#X connect 16 0 10 0;
#X connect 21 0 13 0;
#X connect 22 0 14 0;
#X connect 23 0 24 0;
#X connect 24 0 8 0;