diff options
author | Cyrille Henry <nusmuk@users.sourceforge.net> | 2015-07-26 20:08:01 +0000 |
---|---|---|
committer | Cyrille Henry <nusmuk@users.sourceforge.net> | 2015-07-26 20:08:01 +0000 |
commit | 33615ea88d1d44a04252347fdf28983116a365e0 (patch) | |
tree | d991c0230b3a3b171c75b765e814343839782b21 /examples | |
parent | 1137b3860fce28495161ad61d6f04c8350f2da4d (diff) |
add a next type of like : hinge can force an angle between masses...
svn path=/trunk/externals/pmpd/; revision=17500
Diffstat (limited to 'examples')
-rw-r--r-- | examples/68_2d_hinge.pd | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/examples/68_2d_hinge.pd b/examples/68_2d_hinge.pd new file mode 100644 index 0000000..a901298 --- /dev/null +++ b/examples/68_2d_hinge.pd @@ -0,0 +1,107 @@ +#N canvas 640 304 796 716 10; +#X obj 31 576 pmpd2d; +#X msg 99 332 setK hinge \$1; +#X msg 129 384 setD hinge \$1; +#X floatatom 99 308 5 0 0 0 - - -, f 5; +#X floatatom 129 361 5 0 0 0 - - -, f 5; +#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 229 446 setL hinge \$1; +#X floatatom 229 424 5 0 0 0 - - -, f 5; +#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 text 271 425 angle (in radian); +#X connect 0 0 15 0; +#X connect 1 0 0 0; +#X connect 2 0 0 0; +#X connect 3 0 1 0; +#X connect 4 0 2 0; +#X connect 7 0 16 0; +#X connect 8 0 16 0; +#X connect 9 0 0 0; +#X connect 10 0 9 0; +#X connect 11 0 0 0; +#X connect 12 0 0 0; +#X connect 13 0 0 0; +#X connect 14 0 0 0; +#X connect 15 0 5 0; +#X connect 15 1 5 1; +#X connect 15 2 6 0; +#X connect 17 0 11 0; +#X connect 22 0 14 0; |