diff options
Diffstat (limited to 'msd2D/01_msd2Dtest.pd')
-rw-r--r-- | msd2D/01_msd2Dtest.pd | 188 |
1 files changed, 188 insertions, 0 deletions
diff --git a/msd2D/01_msd2Dtest.pd b/msd2D/01_msd2Dtest.pd new file mode 100644 index 0000000..8471b97 --- /dev/null +++ b/msd2D/01_msd2Dtest.pd @@ -0,0 +1,188 @@ +#N canvas 396 84 839 834 10; +#X obj 52 15 loadbang; +#X obj 314 524 print msd; +#X obj 633 647 gemwin; +#X msg 633 625 0 \, destroy; +#X obj 553 709 gemhead; +#X obj 553 732 world_light; +#X msg 633 562 reset \, create \, lighting 1 \, 1; +#X obj 53 499 msd2D --------------------------------; +#X obj 122 15 cnv 15 500 270 empty empty empty 20 12 0 14 -262131 -66577 +0; +#X obj 135 261 t a; +#X obj 135 20 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +-1; +#X msg 207 71 reset; +#X text 173 21 reset; +#X obj 135 42 t b b b b b; +#X msg 153 160 50 50; +#X msg 135 235 link souple \$1 \$2 \$3 \$4 \$5; +#X msg 170 140 mass mob 1 \$1 \$2 \$3; +#X msg 189 91 mass fix 0 100 50 50; +#X msg 171 116 100 20 10 \, 200 20 25; +#X msg 153 181 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X obj 50 292 cnv 15 572 80 empty empty empty 20 12 0 14 -261689 -66577 +0; +#X obj 53 300 gemhead; +#X obj 53 323 t b; +#X msg 53 345 bang \, get massesPos \, get linksPos; +#X text 413 87 CREATION : 3 MASSES \, 2 LINKS; +#X text 292 313 COMPUTE AND GET ALL MASSES AND LINKS POSITIONS; +#X obj 50 376 cnv 15 572 110 empty empty empty 20 12 0 14 -262131 -66577 +0; +#X msg 82 442 forceX mob 100; +#X msg 85 383 setD souple 0.01; +#X msg 216 384 setK souple 1; +#X msg 85 403 setD souple 1; +#X msg 216 404 setK souple 2; +#X msg 208 443 forceY mob 100; +#X text 351 396 SET RIGIDITY AND VISCOSITY OF LINKS; +#X text 367 442 ADD FORCE ON ALL MOBILE MASSES; +#X obj 47 547 cnv 15 400 200 empty empty empty 20 12 0 14 -261689 -66577 +0; +#N canvas 643 123 605 590 massrender 0; +#X obj 127 22 inlet; +#X obj 48 203 translateXYZ; +#X obj 48 229 sphere 0.1; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 192 87 / 12.5; +#X obj 192 110 - 4; +#X obj 64 114 gemhead; +#X obj 48 177 separator; +#X obj 48 153 any; +#X obj 127 57 unpack f f; +#X obj 125 136 t b f; +#X connect 0 0 10 0; +#X connect 1 0 2 0; +#X connect 3 0 4 0; +#X connect 4 0 11 0; +#X connect 5 0 6 0; +#X connect 6 0 1 2; +#X connect 7 0 9 1; +#X connect 8 0 1 0; +#X connect 9 0 8 0; +#X connect 10 0 3 0; +#X connect 10 1 5 0; +#X connect 11 0 9 0; +#X connect 11 1 1 1; +#X restore 134 591 pd massrender; +#N canvas 284 227 587 558 linkrender 0; +#X obj 93 25 inlet; +#X obj 93 117 / 12.5; +#X obj 93 140 - 4; +#X obj 147 118 / 12.5; +#X obj 147 141 - 4; +#X obj 35 134 gemhead; +#X obj 44 222 separator; +#X obj 44 192 any; +#X obj 93 164 t b f; +#X obj 93 69 unpack f f f f; +#X obj 44 265 curve 2; +#X obj 207 121 / 12.5; +#X obj 207 144 - 4; +#X obj 261 122 / 12.5; +#X obj 261 145 - 4; +#X obj 123 194 pack f f; +#X msg 123 217 \$1 \$2 0; +#X obj 207 193 pack f f; +#X msg 207 216 \$1 \$2 0; +#X connect 0 0 9 0; +#X connect 1 0 2 0; +#X connect 2 0 8 0; +#X connect 3 0 4 0; +#X connect 4 0 15 1; +#X connect 5 0 7 1; +#X connect 6 0 10 0; +#X connect 7 0 6 0; +#X connect 8 0 7 0; +#X connect 8 1 15 0; +#X connect 9 0 1 0; +#X connect 9 1 3 0; +#X connect 9 2 11 0; +#X connect 9 3 13 0; +#X connect 11 0 12 0; +#X connect 12 0 17 0; +#X connect 13 0 14 0; +#X connect 14 0 17 1; +#X connect 15 0 16 0; +#X connect 16 0 10 1; +#X connect 17 0 18 0; +#X connect 18 0 10 2; +#X restore 53 612 pd linkrender; +#X obj 53 562 route linksPos massesPos; +#X text 261 572 DISPLAY MASSES AND LINKS; +#X text 309 594 WITH GEM; +#X text 465 563 1 CREATE WINDOW -->; +#X text 464 626 3 AND DESTROY IT! -->; +#X text 464 594 2 DRAG THE STRUCTURE WITH THE MOUSE; +#X msg 135 213 0 1 5 0.5 0.5 \, 1 2 1 0.5 0; +#N canvas 731 296 450 300 gemmouse 0; +#X obj 189 77 gemmouse; +#X obj 189 184 pack f f; +#X obj 189 218 spigot; +#X obj 103 244 outlet; +#X obj 189 131 - 0; +#X obj 216 131 + 100; +#X obj 189 108 / 5; +#X obj 216 108 / -5; +#X obj 79 51 inlet; +#X obj 140 75 inlet; +#X obj 141 120 l; +#X obj 109 98 t b; +#X connect 0 0 6 0; +#X connect 0 1 7 0; +#X connect 0 2 2 1; +#X connect 1 0 2 0; +#X connect 2 0 10 1; +#X connect 4 0 1 0; +#X connect 5 0 1 1; +#X connect 6 0 4 0; +#X connect 7 0 5 0; +#X connect 8 0 11 0; +#X connect 9 0 10 1; +#X connect 10 0 3 0; +#X connect 11 0 10 0; +#X restore 53 674 pd gemmouse; +#X obj 53 653 gemhead; +#X msg 53 695 posX fix \$1; +#X msg 53 716 posY fix \$2; +#X text 204 677 SET FIXED MASS TO MOUSE POSITION; +#X connect 0 0 13 0; +#X connect 3 0 2 0; +#X connect 4 0 5 0; +#X connect 6 0 2 0; +#X connect 7 0 38 0; +#X connect 7 1 1 0; +#X connect 9 0 7 0; +#X connect 10 0 13 0; +#X connect 11 0 9 0; +#X connect 13 0 44 0; +#X connect 13 1 14 0; +#X connect 13 1 19 0; +#X connect 13 2 18 0; +#X connect 13 3 17 0; +#X connect 13 4 11 0; +#X connect 14 0 45 1; +#X connect 15 0 9 0; +#X connect 16 0 9 0; +#X connect 17 0 9 0; +#X connect 18 0 16 0; +#X connect 19 0 9 0; +#X connect 21 0 22 0; +#X connect 22 0 23 0; +#X connect 23 0 7 0; +#X connect 27 0 7 0; +#X connect 28 0 7 0; +#X connect 29 0 7 0; +#X connect 30 0 7 0; +#X connect 31 0 7 0; +#X connect 32 0 7 0; +#X connect 38 0 37 0; +#X connect 38 1 36 0; +#X connect 44 0 15 0; +#X connect 45 0 47 0; +#X connect 45 0 48 0; +#X connect 46 0 45 0; +#X connect 47 0 7 0; +#X connect 48 0 7 0; |