diff options
Diffstat (limited to 'msd2D/03_imsd2Dtest.pd')
-rw-r--r-- | msd2D/03_imsd2Dtest.pd | 172 |
1 files changed, 82 insertions, 90 deletions
diff --git a/msd2D/03_imsd2Dtest.pd b/msd2D/03_imsd2Dtest.pd index 0e6a588..a5ec27f 100644 --- a/msd2D/03_imsd2Dtest.pd +++ b/msd2D/03_imsd2Dtest.pd @@ -1,34 +1,13 @@ -#N canvas 574 52 843 838 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 +#N canvas 568 230 687 149 10; +#X obj 23 17 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X msg 221 71 reset; -#X text 173 21 reset; -#X msg 153 170 50 50; -#X msg 203 91 mass fix 0 100 50 50; -#X msg 169 192 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 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 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; +#X text 43 16 reset; +#N canvas 0 22 763 327 gem_stuff 0; +#X msg 137 179 0 \, destroy; +#X obj 118 200 gemwin; +#X obj 118 104 inlet; +#X obj 118 129 sel 1 0; +#X msg 118 156 reset \, create \, 1; #N canvas 284 227 591 562 linkrender 0; #X obj 150 9 inlet; #X obj 150 101 / 12.5; @@ -73,10 +52,9 @@ #X connect 17 0 5 0; #X connect 18 0 19 0; #X connect 19 0 17 0; -#X restore 62 601 pd linkrender; -#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 restore 262 171 pd linkrender; +#X obj 262 133 route linksPos; +#X obj 262 110 r \$0-msdout; #N canvas 731 296 454 304 gemmouse 0; #X obj 189 77 gemmouse; #X obj 189 184 pack f f; @@ -87,78 +65,92 @@ #X obj 189 108 / 5; #X obj 216 108 / -5; #X obj 79 51 inlet; -#X obj 140 75 inlet; #X obj 109 98 t b; #X obj 108 139 list; +#X obj 141 42 r mouse_init; #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 11 1; +#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 9 0; +#X connect 9 0 10 0; +#X connect 10 0 3 0; +#X connect 11 0 10 1; +#X restore 404 127 pd gemmouse; +#X obj 404 106 gemhead; +#X msg 405 147 posX fix \$1; +#X msg 406 168 posY fix \$2; +#X obj 405 194 s \$0-msdin; +#X connect 0 0 1 0; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 1 0 0; +#X connect 4 0 1 0; +#X connect 6 0 5 0; +#X connect 7 0 6 0; #X connect 8 0 10 0; -#X connect 9 0 11 1; -#X connect 10 0 11 0; -#X connect 11 0 3 0; -#X restore 104 657 pd gemmouse; -#X obj 104 636 gemhead; -#X msg 105 677 posX fix \$1; -#X msg 106 698 posY fix \$2; -#X text 204 677 SET FIXED MASS TO MOUSE POSITION; +#X connect 8 0 11 0; +#X connect 9 0 8 0; +#X connect 10 0 12 0; +#X connect 11 0 12 0; +#X restore 23 86 pd gem_stuff; +#X obj 23 64 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1 +; +#X text 43 63 gem on/off; +#N canvas 487 334 635 333 creation 0; +#X obj 52 15 loadbang; +#X msg 221 71 reset; +#X msg 153 170 50 50; +#X msg 203 91 mass fix 0 100 50 50; +#X msg 169 192 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; #X msg 186 150 mass mob 1 100 \$1 \$2; #X obj 135 42 t b b b b b b; #X msg 186 116 20 50 \, 23 61 \, 29 71 \, 39 77 \, 50 80 \, 61 77 \, 71 71 \, 77 61 \, 80 50 \, 77 39 \, 71 29 \, 61 23 \, 50 20 \, 39 23 \, 29 29 \, 23 39; -#X msg 625 711 0.9 0.9 0.9; -#X obj 62 563 route linksPos; -#X msg 53 345 bang \, get linksPos; -#X text 292 313 COMPUTE AND GET ALL LINKS POSITIONS; -#X text 260 572 DISPLAY LINKS WITH GEM; -#X msg 85 383 setD inter 0; -#X msg 216 384 setK inter 1; -#X msg 216 404 setK inter 2; #X msg 144 211 link intf mob 0 10 2.5; #X msg 135 234 link inter mob mob 1 2.5; -#X text 290 43 CREATION : 17 MASSES \, 2 interactor LINKS; -#X connect 0 0 35 0; -#X connect 3 0 2 0; +#X obj 192 270 s mouse_init; +#X obj 135 261 s \$0-msdin; +#X obj 239 25 inlet; +#X text 303 226 all links are created with these two messages; +#X connect 0 0 6 0; +#X connect 1 0 11 0; +#X connect 2 0 10 0; +#X connect 3 0 11 0; +#X connect 4 0 11 0; +#X connect 5 0 11 0; +#X connect 6 0 9 0; +#X connect 6 1 8 0; +#X connect 6 2 2 0; +#X connect 6 2 4 0; +#X connect 6 3 7 0; +#X connect 6 4 3 0; +#X connect 6 5 1 0; +#X connect 7 0 5 0; +#X connect 8 0 11 0; +#X connect 9 0 11 0; +#X connect 12 0 6 0; +#X restore 23 40 pd creation; +#N canvas 0 22 450 300 compute 0; +#X obj 53 100 gemhead; +#X obj 53 123 t b; +#X msg 53 145 bang \, get linksPos; +#X obj 53 224 s \$0-msdout; +#X obj 63 174 r \$0-msdin; +#X obj 53 198 msd2D; +#X connect 0 0 1 0; +#X connect 1 0 2 0; +#X connect 2 0 5 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 35 0; -#X connect 11 0 9 0; -#X connect 13 0 29 1; -#X connect 14 0 9 0; -#X connect 15 0 9 0; -#X connect 17 0 18 0; -#X connect 18 0 39 0; -#X connect 20 0 7 0; -#X connect 21 0 7 0; -#X connect 29 0 31 0; -#X connect 29 0 32 0; -#X connect 30 0 29 0; -#X connect 31 0 7 0; -#X connect 32 0 7 0; -#X connect 34 0 9 0; -#X connect 35 0 46 0; -#X connect 35 1 45 0; -#X connect 35 2 13 0; -#X connect 35 2 15 0; -#X connect 35 3 36 0; -#X connect 35 4 14 0; -#X connect 35 5 11 0; -#X connect 36 0 34 0; -#X connect 37 0 5 1; -#X connect 38 0 25 0; -#X connect 39 0 7 0; -#X connect 42 0 7 0; -#X connect 43 0 7 0; -#X connect 44 0 7 0; -#X connect 45 0 9 0; -#X connect 46 0 9 0; +#X connect 5 0 3 0; +#X restore 23 111 pd compute; +#X text 164 54 create window; +#X text 164 69 and drag the structure with the mouse; +#X connect 0 0 5 0; +#X connect 3 0 2 0; |