diff options
Diffstat (limited to 'msd2D')
-rw-r--r-- | msd2D/05_msd2DDataStruct.pd | 107 | ||||
-rw-r--r-- | msd2D/make_anim.pd | 204 | ||||
-rw-r--r-- | msd2D/structures.pd | 27 |
3 files changed, 338 insertions, 0 deletions
diff --git a/msd2D/05_msd2DDataStruct.pd b/msd2D/05_msd2DDataStruct.pd new file mode 100644 index 0000000..ce67eae --- /dev/null +++ b/msd2D/05_msd2DDataStruct.pd @@ -0,0 +1,107 @@ +#N struct liaison float x1 float y1 float x2 float y2 float mid1 float +mid2 float lid; +#N struct mass float x float y float mid float mob; +#N struct fixmass float x float y float mid; +#N canvas 391 53 852 890 10; +#X obj 52 15 loadbang; +#X obj 52 501 msd2D --------------------------------; +#X obj 135 274 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 obj 574 252 structures; +#X obj 53 188 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 153 181 Xmax 300 \, Xmin 0 \, Ymax 300 \, Ymin 0; +#X msg 171 146 mass mob 1 100 \$1 \$2; +#X msg 186 317 forceY mob 8; +#X msg 135 252 link souple \$1 \$2 10 2.5 1.5; +#X msg 171 113 100 300 \, 150 300 \, 100 230 \, 150 230 \, 100 180 +\, 150 180 \, 50 180 \, 200 180 \, 115 180 \, 135 180 \, 110 150 \, +140 150; +#X msg 135 205 0 5 \, 1 2 \, 1 4 \, 2 3 \, 3 0 \, 0 2 \, 1 3 \, 2 4 +\, 4 5 \, 5 3 \, 3 4 \, 2 5 \, 4 6 \, 5 7 \, 6 5 \, 4 7 \, 4 8 \, 5 +9 \, 8 9 \, 8 10 \, 10 11 \, 11 9 \, 9 10 \, 8 11; +#X msg 211 443 forceY mob -500; +#X msg 211 466 forceY mob 500; +#X msg 86 441 forceX mob 500; +#X msg 86 464 forceX mob -500; +#X obj 53 217 metro 10; +#X msg 52 571 forceY 6 -500 \, forceY 7 -500; +#X msg 52 540 forceX 0 -500 \, forceX 1 500; +#X msg 52 609 forceY 0 -500 \, forceY 1 -500 \, forceX 0 -500 \, forceX +1 500; +#N canvas 0 0 307 306 1000-anim 0; +#X scalar liaison 181.293 300 243.137 187.054 0 0 0 \;; +#X scalar liaison 252.758 300 192.826 235.497 0 0 0 \;; +#X scalar liaison 252.758 300 190.913 187.054 0 0 0 \;; +#X scalar liaison 192.826 235.497 241.225 235.497 0 0 0 \;; +#X scalar liaison 241.225 235.497 181.293 300 0 0 0 \;; +#X scalar liaison 181.293 300 192.826 235.497 0 0 0 \;; +#X scalar liaison 252.758 300 241.225 235.497 0 0 0 \;; +#X scalar liaison 192.826 235.497 190.913 187.054 0 0 0 \;; +#X scalar liaison 190.913 187.054 243.137 187.054 0 0 0 \;; +#X scalar liaison 243.137 187.054 241.225 235.497 0 0 0 \;; +#X scalar liaison 241.225 235.497 190.913 187.054 0 0 0 \;; +#X scalar liaison 192.826 235.497 243.137 187.054 0 0 0 \;; +#X scalar liaison 190.913 187.054 150.806 220.479 0 0 0 \;; +#X scalar liaison 243.137 187.054 283.244 220.479 0 0 0 \;; +#X scalar liaison 150.806 220.479 243.137 187.054 0 0 0 \;; +#X scalar liaison 190.913 187.054 283.244 220.479 0 0 0 \;; +#X scalar liaison 190.913 187.054 205.914 196.864 0 0 0 \;; +#X scalar liaison 243.137 187.054 228.137 196.864 0 0 0 \;; +#X scalar liaison 205.914 196.864 228.137 196.864 0 0 0 \;; +#X scalar liaison 205.914 196.864 202.014 167.631 0 0 0 \;; +#X scalar liaison 202.014 167.631 232.035 167.63 0 0 0 \;; +#X scalar liaison 232.035 167.63 228.137 196.864 0 0 0 \;; +#X scalar liaison 228.137 196.864 202.014 167.631 0 0 0 \;; +#X scalar liaison 205.914 196.864 232.035 167.63 0 0 0 \;; +#X scalar mass 181.293 300 0 0 \;; +#X scalar mass 252.758 300 1 0 \;; +#X scalar mass 192.826 235.497 2 0 \;; +#X scalar mass 241.225 235.497 3 0 \;; +#X scalar mass 190.913 187.054 4 0 \;; +#X scalar mass 243.137 187.054 5 0 \;; +#X scalar mass 150.806 220.479 6 0 \;; +#X scalar mass 283.244 220.479 7 0 \;; +#X scalar mass 205.914 196.864 8 0 \;; +#X scalar mass 228.137 196.864 9 0 \;; +#X scalar mass 202.014 167.631 10 0 \;; +#X scalar mass 232.035 167.63 11 0 \;; +#X coords 0 0 300 300 300 300 1; +#X restore 466 370 pd \$0-anim; +#X obj 52 290 make_anim \$0-anim; +#X text 26 165 3 - metro ON; +#X text 333 302 1 - Create the Datastructre; +#X text 333 321 2 - notch the "poll" case to set DS to actual model +state; +#X text 95 417 4 - "force" the dancer to move; +#X connect 0 0 6 0; +#X connect 1 0 24 0; +#X connect 1 1 24 0; +#X connect 2 0 1 0; +#X connect 3 0 6 0; +#X connect 4 0 2 0; +#X connect 6 0 14 0; +#X connect 6 1 9 0; +#X connect 6 2 13 0; +#X connect 6 4 4 0; +#X connect 8 0 19 0; +#X connect 9 0 2 0; +#X connect 10 0 2 0; +#X connect 11 0 1 0; +#X connect 12 0 2 0; +#X connect 13 0 10 0; +#X connect 14 0 12 0; +#X connect 15 0 1 0; +#X connect 16 0 1 0; +#X connect 17 0 1 0; +#X connect 18 0 1 0; +#X connect 19 0 1 0; +#X connect 19 0 11 0; +#X connect 20 0 1 0; +#X connect 21 0 1 0; +#X connect 22 0 1 0; +#X connect 24 0 1 0; diff --git a/msd2D/make_anim.pd b/msd2D/make_anim.pd new file mode 100644 index 0000000..8b635d8 --- /dev/null +++ b/msd2D/make_anim.pd @@ -0,0 +1,204 @@ +#N struct mass float x float y float mid float mob; +#N struct fixmass float x float y float mid; +#N canvas 327 365 669 506 10; +#X obj 352 260 pointer; +#X obj 86 83 spigot; +#X obj 227 148 bng 24 250 50 0 \$0-create empty Create 0 -6 0 8 -262144 +-1 -1; +#X obj 316 76 r \$0-create; +#X obj 123 50 r \$0-listen; +#X obj 533 184 s \$0-listen; +#X msg 533 159 1; +#X obj 316 98 t b b b b b; +#X obj 199 217 s \$0-listen; +#X msg 199 191 0; +#N canvas 0 0 870 770 1002-anim 0; +#X scalar mass 501.859 143.462 2 0 \;; +#X scalar mass 385.528 207.845 3 0 \;; +#X scalar mass 563.885 96.7994 4 0 \;; +#X scalar mass 436.681 183.23 5 0 \;; +#X scalar mass 677.97 25.7242 6 0 \;; +#X scalar mass 635.854 51.7641 7 0 \;; +#X scalar fixmass 287 68 0 \;; +#X scalar fixmass 56 223 1 \;; +#X restore 220 25 pd \$0-anim; +#X obj 446 329 makefilename pd-%s; +#X obj 446 283 loadbang; +#X msg 446 261 bang; +#X obj 446 353 s \$0-cnv; +#X obj 400 137 symbol; +#X obj 407 98 r \$0-cnv; +#X obj 352 137 symbol; +#X msg 352 228 traverse \$1 \, bang; +#X obj 86 27 inlet; +#X obj 143 326 tgl 15 0 empty empty poll 0 -6 0 8 -262144 -1 -1 1 1 +; +#X msg 400 160 \; \$1 clear \;; +#X obj 464 376 r \$0-cnv; +#X obj 413 334 tgl 15 0 empty empty view 0 -6 0 8 -262144 -1 -1 0 1 +; +#X obj 413 403 pack 0 s; +#X msg 413 434 \; \$2 vis \$1; +#X obj 59 376 metro 40; +#X obj 59 401 s \$0-create; +#X obj 284 221 outlet; +#X obj 446 305 symbol \$1; +#N canvas 683 281 568 586 make_link 0; +#X obj 165 35 inlet; +#X obj 367 438 inlet; +#X obj 236 135 s \$0-mass2; +#X obj 334 305 r \$0-mass2; +#X obj 293 283 r \$0-mass1; +#X obj 203 159 s \$0-mass1; +#N canvas 0 0 591 644 look4mass2 0; +#X msg 228 199 next; +#X obj 228 463 spigot; +#X obj 228 386 pack 0 0; +#X obj 228 508 unpack 0 0; +#X obj 295 411 r \$0-mass2; +#X obj 228 562 outlet; +#X obj 293 564 outlet; +#X obj 228 68 inlet; +#X obj 228 90 t b b; +#X obj 437 327 select 0; +#X obj 137 319 get mass x y mid; +#X obj 281 317 get fixmass x y mid; +#X obj 265 437 == -1; +#X obj 367 247 print lookmass1; +#X msg 404 136 traverse pd-data \, next; +#X obj 228 229 pointer; +#X connect 0 0 15 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 5 0; +#X connect 3 1 6 0; +#X connect 4 0 12 1; +#X connect 7 0 8 0; +#X connect 8 0 0 0; +#X connect 8 1 14 0; +#X connect 9 0 0 0; +#X connect 10 0 2 0; +#X connect 10 1 2 1; +#X connect 10 2 12 0; +#X connect 11 0 2 0; +#X connect 11 1 2 1; +#X connect 11 2 12 0; +#X connect 12 0 1 1; +#X connect 12 0 9 0; +#X connect 14 0 15 0; +#X connect 15 0 10 0; +#X connect 15 0 11 0; +#X connect 15 1 13 0; +#X restore 184 267 pd look4mass2; +#X obj 165 67 t b b a a; +#X msg 203 113 \$3; +#X msg 236 113 \$4; +#N canvas 0 0 591 644 look4mass1 0; +#X msg 228 199 next; +#X obj 228 463 spigot; +#X obj 228 386 pack 0 0; +#X obj 228 508 unpack 0 0; +#X obj 228 562 outlet; +#X obj 293 564 outlet; +#X obj 228 68 inlet; +#X obj 228 90 t b b; +#X obj 437 327 select 0; +#X obj 228 229 pointer mass fixmass; +#X obj 137 319 get mass x y mid; +#X obj 281 317 get fixmass x y mid; +#X obj 295 384 r \$0-mass1; +#X obj 265 437 == -1; +#X msg 404 136 traverse pd-data \, bang; +#X connect 0 0 9 0; +#X connect 1 0 3 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 3 1 5 0; +#X connect 6 0 7 0; +#X connect 7 0 0 0; +#X connect 7 1 14 0; +#X connect 8 0 0 0; +#X connect 9 0 10 0; +#X connect 9 1 11 0; +#X connect 10 0 2 0; +#X connect 10 1 2 1; +#X connect 10 2 13 0; +#X connect 11 0 2 0; +#X connect 11 1 2 1; +#X connect 11 2 13 0; +#X connect 12 0 13 1; +#X connect 13 0 1 1; +#X connect 13 0 8 0; +#X connect 14 0 9 0; +#X restore 160 241 pd look4mass1; +#X obj 121 463 append liaison x1 y1 x2 y2 mid1 mid2; +#X obj 159 358 pack 0 0 0 0 0 0; +#X obj 167 417 print linklist; +#X connect 0 0 7 0; +#X connect 1 0 11 6; +#X connect 3 0 12 5; +#X connect 4 0 12 4; +#X connect 6 0 12 2; +#X connect 6 1 12 3; +#X connect 7 0 10 0; +#X connect 7 1 6 0; +#X connect 7 2 8 0; +#X connect 7 3 9 0; +#X connect 8 0 5 0; +#X connect 9 0 2 0; +#X connect 10 0 12 0; +#X connect 10 1 12 1; +#X connect 12 0 11 0; +#X connect 12 0 13 0; +#X restore 273 411 pd make_link; +#X text 216 384 LATER:; +#X obj 86 113 route Mass linksPos; +#X msg 284 198 infosL \, get linksPos; +#X obj 192 345 append liaison x1 y1 x2 y2; +#X msg 195 325 \$2 \$3 \$4 \$5; +#X obj 141 257 append mass mid x y; +#X msg 141 168 \$1 \$5 \$6; +#X obj 86 142 t a a; +#X msg 62 166 \$3; +#X obj 62 283 set mass mob; +#X obj 62 229 * 0; +#X connect 0 0 30 1; +#X connect 0 0 34 4; +#X connect 0 0 36 3; +#X connect 1 0 32 0; +#X connect 3 0 7 0; +#X connect 4 0 1 1; +#X connect 6 0 5 0; +#X connect 7 0 9 0; +#X connect 7 1 33 0; +#X connect 7 2 17 0; +#X connect 7 3 15 0; +#X connect 7 4 6 0; +#X connect 7 4 13 0; +#X connect 9 0 8 0; +#X connect 11 0 14 0; +#X connect 12 0 29 0; +#X connect 13 0 29 0; +#X connect 15 0 21 0; +#X connect 16 0 15 1; +#X connect 16 0 17 1; +#X connect 17 0 18 0; +#X connect 18 0 0 0; +#X connect 19 0 1 0; +#X connect 20 0 26 0; +#X connect 22 0 24 1; +#X connect 23 0 24 0; +#X connect 24 0 25 0; +#X connect 26 0 27 0; +#X connect 29 0 11 0; +#X connect 32 0 38 0; +#X connect 32 1 35 0; +#X connect 33 0 28 0; +#X connect 35 0 34 0; +#X connect 36 0 40 1; +#X connect 37 0 36 0; +#X connect 38 0 39 0; +#X connect 38 1 37 0; +#X connect 39 0 41 0; +#X connect 41 0 40 0; +#X coords 0 0 1 1 120 80 1; diff --git a/msd2D/structures.pd b/msd2D/structures.pd new file mode 100644 index 0000000..c19074e --- /dev/null +++ b/msd2D/structures.pd @@ -0,0 +1,27 @@ +#N canvas 752 10 450 300 10; +#N canvas 389 332 664 321 mass 0; +#X obj 62 182 drawnumber mid 0 -18 0 m; +#X obj 64 72 struct mass float x float y float mid float mob; +#X obj 61 136 filledpolygon mob mob 1 -5 0 -4 4 0 5 4 4 5 0 4 -4 0 +-5 -4 -4; +#X restore 132 125 pd mass; +#N canvas 73 302 487 201 liaison 0; +#X obj 19 25 struct liaison float x1 float y1 float x2 float y2 float +mid1 float mid2 float lid; +#X obj 23 73 drawpolygon lid 2 x1 y1 x2 y2; +#X restore 132 169 pd liaison; +#N canvas 0 0 450 300 model 0; +#X obj 50 102 plot m 0 0 0 0; +#X obj 51 135 plot l 0 0 0 0; +#X obj 45 72 struct model float x1 array m mass array l liaison; +#X restore 132 147 pd model; +#N canvas 389 332 664 321 fixmass 0; +#X obj 64 72 struct fixmass float x float y float mid; +#X obj 61 136 filledpolygon 900 900 1 -5 0 -4 4 0 5 4 4 5 0 4 -4 0 +-5 -4 -4; +#X obj 51 203 drawnumber mid 0 -18 900 m; +#X restore 132 191 pd fixmass; +#N canvas 0 0 450 300 fixed 0; +#X obj 50 97 plot f 0 0 0 0; +#X obj 49 56 struct fixed float x float y array f fixmass; +#X restore 132 213 pd fixed; |