aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorCyrille Henry <nusmuk@users.sourceforge.net>2011-02-24 21:54:15 +0000
committerCyrille Henry <nusmuk@users.sourceforge.net>2011-02-24 21:54:15 +0000
commit9a67203035c21278862c9810bbbe3d647255002d (patch)
tree6a58948e9d06063f509b49621cdf603297fbb6d7 /examples
parente48f931368d604d8d4a36dc0ef41262d9eebbd79 (diff)
add 2 more examples --Cette ligne, et les suivantes ci-dessous, seront
ignorées-- M pmpd/Makefile A pmpd/examples/62_draw_link_force_2d.pd A pmpd/examples/61_draw_link_force.pd svn path=/trunk/externals/pmpd/; revision=14962
Diffstat (limited to 'examples')
-rw-r--r--examples/61_draw_link_force.pd137
-rw-r--r--examples/62_draw_link_force_2d.pd75
2 files changed, 212 insertions, 0 deletions
diff --git a/examples/61_draw_link_force.pd b/examples/61_draw_link_force.pd
new file mode 100644
index 0000000..c8f3d27
--- /dev/null
+++ b/examples/61_draw_link_force.pd
@@ -0,0 +1,137 @@
+#N canvas 520 143 745 681 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 373 168 reset;
+#X obj 334 148 t b b b;
+#X obj 29 388 msd;
+#X obj 334 282 s \$0-msd;
+#X obj 84 338 r \$0-msd;
+#X obj 334 129 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 29 451 tabwrite force;
+#X msg 353 194 mass M1 0 1 0;
+#X obj 29 409 route massesForcesId;
+#X obj 29 431 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 0.745 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507
+0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027
+0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.00480001 -0.0075
+-0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588
+-0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587
+-0.1728 -0.1875 -0.2028 -0.2187 -0.2352 -0.2523 0 0.2523 0.2352 0.2187
+0.2028 0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867
+0.0768 0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147
+0.0108 0.0075 0.00480001 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012
+-0.0027 -0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363
+-0.0432 -0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.745
+-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 327 368 graph;
+#X obj 30 284 * 1;
+#X text 167 152 link length;
+#X text 359 127 reset;
+#X text 65 133 draw;
+#X msg 362 213 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 30 132 200;
+#X text 31 9 This abstraction help to draw link forces regarding to
+it's elongation;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array force2 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.566894 0.594884 0.625 0.1083 0.0972 0.0867 0.0768 0.0675 0.0588 0.0507
+0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108 0.00749999 0.0048 0.0027
+0.0012 0.000299999 0 -0.000300001 -0.0012 -0.0027 -0.0048 -0.0075 -0.0108
+-0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432 -0.0507 -0.0588 -0.0675
+-0.0768 -0.0867 -0.0972 -0.1083 -0.12 -0.1323 -0.1452 -0.1587 -0.1728
+-0.1875 -0.2028 -0.2187 -0.2352 -0.2523 -0 0.2523 0.2352 0.2187 0.2028
+0.1875 0.1728 0.1587 0.1452 0.1323 0.12 0.1083 0.0972 0.0867 0.0768
+0.0675 0.0588 0.0507 0.0432 0.0363 0.03 0.0243 0.0192 0.0147 0.0108
+0.0075 0.0048 0.0027 0.0012 0.000300001 0 -0.000299999 -0.0012 -0.0027
+-0.0048 -0.00749999 -0.0108 -0.0147 -0.0192 -0.0243 -0.03 -0.0363 -0.0432
+-0.0507 -0.0588 -0.0675 -0.0768 -0.0867 -0.0972 -0.1083 -0.625 -0.594884
+-0.566894 -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 326 529 graph;
+#X obj 64 564 route massesForcesId;
+#X obj 64 543 pmpd;
+#X obj 64 606 tabwrite force2;
+#X obj 64 586 route 1;
+#X msg 334 240 link test M1 M2 0.1 0 -2 0.5 10 \, setL test 0.1;
+#X msg 354 260 link test2 M1 M2 3 0 2 0 0.5 \, setL test2 0.3;
+#X msg 30 304 posX M2 0 \, bang \, posX M2 \$1 \, bang \, get massesForces
+M2;
+#X msg 191 474 print;
+#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 34 0;
+#X connect 7 0 35 0;
+#X connect 7 1 16 0;
+#X connect 7 1 24 0;
+#X connect 7 2 6 0;
+#X connect 8 0 17 0;
+#X connect 10 0 8 0;
+#X connect 10 0 31 0;
+#X connect 11 0 7 0;
+#X connect 12 0 20 0;
+#X connect 13 0 20 1;
+#X connect 14 0 1 0;
+#X connect 14 1 15 1;
+#X connect 14 1 32 1;
+#X connect 16 0 9 0;
+#X connect 17 0 18 0;
+#X connect 18 0 15 0;
+#X connect 20 0 36 0;
+#X connect 24 0 9 0;
+#X connect 25 0 26 0;
+#X connect 26 0 27 0;
+#X connect 26 1 11 0;
+#X connect 27 0 4 0;
+#X connect 30 0 33 0;
+#X connect 31 0 30 0;
+#X connect 33 0 32 0;
+#X connect 34 0 9 0;
+#X connect 35 0 9 0;
+#X connect 36 0 8 0;
+#X connect 36 0 31 0;
+#X connect 37 0 31 0;
diff --git a/examples/62_draw_link_force_2d.pd b/examples/62_draw_link_force_2d.pd
new file mode 100644
index 0000000..5c7e708
--- /dev/null
+++ b/examples/62_draw_link_force_2d.pd
@@ -0,0 +1,75 @@
+#N canvas 621 331 876 550 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 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 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;