#N canvas 585 254 571 767 10; #X obj 4 309 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 5 705 cnv 15 550 30 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 8 6 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 14 339 cnv 15 75 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 14 624 cnv 15 75 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 4 567 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 4 602 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 7 76 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 5 655 cnv 15 550 20 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 5 675 cnv 15 550 30 empty empty empty 20 12 0 14 -233017 -66577 0; #N canvas 1 83 901 640 More_Info 0; #X text 96 12 pmpd : mass - spring - damper model; #X text 27 155 Be careful : if masses are deleted \, lists messages won't work; #X text 27 60 It is designed to implement particules physical model in PD.The model is based on two elements type : mass and link. The pmpd masses are the principals objects of the model. They got only one physical parameter \, the value of their mass. They can be mobile or fixed \, in this case forces applied on them automatically \, by links \, or manually \, by messages \, don't do anything.; #X obj 426 -5 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 426 294 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #N canvas 0 50 450 300 (subpatch) 0; #X array rigidity1 4 float 1; #A 0 -1 0 1 2; #X array - 4 float 1; #A 0 0 0 0 0; #X coords 0 3 3 -3 200 150 1; #X restore 31 428 graph; #X text 89 585 L0; #N canvas 324 73 956 727 figure 0; #X obj 284 53 loadbang; #X msg 293 125 \; rigidity1 resize 1 \; rigidity1 resize 4 \; rigidity1 bounds 0 3 3 -3 \; rigidity1 0 -1 0 1 2 \; rigidity1 ylabel -0.5 \; rigidity1 xlabel -3.5 \; rigidity1 xticks 0 1 1 \; rigidity1 yticks 0 0.1 5; #X obj 388 574 sqrt; #X obj 316 651 tabwrite rigidity3; #X obj 343 464 - 20; #X obj 316 609 f; #X obj 316 579 t b f; #X obj 343 494 moses 0; #X obj 343 517 * -1; #X obj 343 538 sqrt; #X obj 343 559 * -1; #X obj 481 479 - 20; #X obj 453 662 f; #X obj 453 632 t b f; #X obj 481 509 moses 0; #X obj 481 532 * -1; #X obj 480 612 * -1; #X obj 528 622 *; #X obj 480 591 *; #X obj 525 590 t f f; #X obj 480 564 t f f; #X obj 453 683 tabwrite rigidity4; #X obj 181 235 t b b; #X obj 620 552 f; #X obj 620 522 t b f; #X obj 620 623 tabwrite rigidity2; #X msg 763 574 0; #X obj 679 437 - 50; #X obj 751 491 moses 40; #X obj 681 510 moses -40; #X obj 620 586 * 1.5; #X obj 680 462 moses 10; #X obj 680 488 moses -10; #X msg 55 419 \; rigidity2 resize 101 \; rigidity2 xticks 1 10 5 \; rigidity2 yticks 0 5 5 \; rigidity3 resize 51 \; rigidity3 xticks 0 1 5 \; rigidity3 yticks 0 1 5 \; rigidity4 resize 51 \; rigidity4 xticks 0 1 5 \; rigidity4 yticks 0 100 5; #X obj 631 315 f; #X obj 648 394 + 1; #X obj 632 367 t f f; #X obj 375 333 f; #X obj 375 360 moses 50.5; #X obj 392 411 + 1; #X obj 376 384 t f f; #X obj 176 141 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 371 310 0; #X msg 627 286 0; #X obj 631 343 moses 100.5; #X connect 0 0 1 0; #X connect 0 0 22 0; #X connect 2 0 5 1; #X connect 4 0 7 0; #X connect 5 0 3 0; #X connect 6 0 5 0; #X connect 6 1 3 1; #X connect 7 0 8 0; #X connect 7 1 2 0; #X connect 8 0 9 0; #X connect 9 0 10 0; #X connect 10 0 5 1; #X connect 11 0 14 0; #X connect 12 0 21 0; #X connect 13 0 12 0; #X connect 13 1 21 1; #X connect 14 0 15 0; #X connect 14 1 19 0; #X connect 15 0 20 0; #X connect 16 0 12 1; #X connect 17 0 12 1; #X connect 18 0 16 0; #X connect 19 0 17 0; #X connect 19 1 17 1; #X connect 20 0 18 0; #X connect 20 1 18 1; #X connect 22 0 42 0; #X connect 22 1 33 0; #X connect 22 1 43 0; #X connect 23 0 30 0; #X connect 24 0 23 0; #X connect 24 1 25 1; #X connect 26 0 23 1; #X connect 27 0 31 0; #X connect 28 0 23 1; #X connect 28 1 26 0; #X connect 29 0 26 0; #X connect 29 1 23 1; #X connect 30 0 25 0; #X connect 31 0 32 0; #X connect 31 1 28 0; #X connect 32 0 29 0; #X connect 32 1 26 0; #X connect 34 0 44 0; #X connect 35 0 34 0; #X connect 36 0 35 0; #X connect 36 1 27 0; #X connect 36 1 24 0; #X connect 37 0 38 0; #X connect 38 0 40 0; #X connect 39 0 37 0; #X connect 40 0 39 0; #X connect 40 1 4 0; #X connect 40 1 6 0; #X connect 40 1 13 0; #X connect 40 1 11 0; #X connect 41 0 22 0; #X connect 42 0 37 0; #X connect 43 0 34 0; #X connect 44 0 36 0; #X restore 27 304 pd figure; #X text 105 375 Rigidity; #N canvas 0 50 450 300 (subpatch) 0; #X array rigidity2 101 float 1; #A 0 0 0 0 0 0 0 0 0 0 0 -60 -58.5 -57 -55.5 -54 -52.5 -51 -49.5 -48 -46.5 -45 -43.5 -42 -40.5 -39 -37.5 -36 -34.5 -33 -31.5 -30 -28.5 -27 -25.5 -24 -22.5 -21 -19.5 -18 -16.5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 16.5 18 19.5 21 22.5 24 25.5 27 28.5 30 31.5 33 34.5 36 37.5 39 40.5 42 43.5 45 46.5 48 49.5 51 52.5 54 55.5 57 58.5 0 0 0 0 0 0 0 0 0 0 0; #X array - 101 float 1; #A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 100 100 -100 200 150 1; #X restore 449 428 graph; #X text 547 583 L0; #X text 466 374 Rigidity with Lmin and Lmax; #X text 563 583 Lmin; #X text 625 582 Lmax; #N canvas 0 50 450 300 (subpatch) 0; #X array rigidity3 51 float 1; #A 0 -4.47214 -4.3589 -4.24264 -4.12311 -4 -3.87298 -3.74166 -3.60555 -3.4641 -3.31662 -3.16228 -3 -2.82843 -2.64575 -2.44949 -2.23607 -2 -1.73205 -1.41421 -1 0 1 1.41421 1.73205 2 2.23607 2.44949 2.64575 2.82843 3 3.16228 3.31662 3.4641 3.60555 3.74166 3.87298 4 4.12311 4.24264 4.3589 4.47214 4.58258 4.69042 4.79583 4.89898 5 5.09902 5.19615 5.2915 5.38516 5.47723; #X array - 51 float 1; #A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 6 50 -6 200 150 1; #X restore 241 428 graph; #X text 314 581 L0; #X text 257 375 Rigidity with power = 1/2; #N canvas 0 50 450 300 (subpatch) 0; #X array rigidity4 51 float 1; #A 0 0 -400 -361 -324 -289 -256 -225 -196 -169 -144 -121 -100 -81 -64 -49 -36 -25 -16 -9 -4 -1 0 1 4 9 16 25 36 49 64 81 100 121 144 169 196 225 256 289 324 361 400 441 484 529 576 625 676 729 784 841; #X array - 51 float 1; #A 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; #X coords 0 1000 50 -1000 200 150 1; #X restore 657 428 graph; #X text 730 582 L0; #X text 688 373 Rigidity with power = 2; #X text 571 12 The equations are :; #X text 497 36 if Lmin<|L[n]-L[0]|; #X text 169 150 2 Drag the structure with the mouse; #X text 169 171 3 Destroy the window -->; #X obj 172 244 route massesPos linksPosNo; #X text 11 19 DESCRIPTION: Physical modeling for Pd in 2d; #X text 265 709 - Cyrille Henry 2011; #X text 265 721 based on MSD by Nicolas Montgermont \, 2005; #N canvas 44 174 1207 766 links_attributes 0; #X obj 5 3 cnv 15 590 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 8 260 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 2 239 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 7 2 ATTRIBUTES Messages; #X text 5 239 Lists :; #X text 168 332 Output all norm of position vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X obj 9 374 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 9 487 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 611 26 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 605 5 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 612 140 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 612 253 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 833 502 \$2 (optional): Masses Id; #X text 832 489 \$1 : table name; #X text 608 5 tables :; #X text 17 26 The attributes messages ask the object to output some of his internal parameters. They can be output by lists for positions and forces of links; #X text 168 272 Output all links center positions in a list on outlet No 1; #X text 168 304 Output all links x or y in a list on outlet No 1; #X obj 10 603 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 182 611 Output all link lenght deformation speed in a list on outlet No 1; #X text 182 647 Output all link lenght deformation speed in x or y in a list on outlet No 1; #X text 212 675 Output all norm of link lenght deformation speed vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X obj 612 369 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 808 377 Output all link lenght deformation speed in a list on outlet No 1; #X text 808 413 Output all link lenght deformation speed in x or y in a list on outlet No 1; #X text 838 441 Output all norm of link lenght deformation speed vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X text 794 35 Output all links center positions in a table [\$1]; #X text 794 67 Output all links center positions x or y in a table [\$1]; #X text 793 105 Output all norm of links center positions vector (sqrt(x*x+y*y)) in a table [\$1]; #X text 168 385 Output all link lenght in a list on outlet No 1; #X text 170 418 Output all link lenght in x or y in a list on outlet No 1; #X text 179 446 Output all norm of link lenght vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X text 169 501 Output all link center speed in a list on outlet No 1; #X text 173 531 Output all link center speed in x or y in a list on outlet No 1; #X text 192 567 Output all norm of link center speed vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X text 797 154 Output all link length in a list on outlet No 1; #X text 796 181 Output all link length in x or y in a list on outlet No 1; #X text 799 218 Output all norm of link length vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X text 795 264 Output all link center speed in a list on outlet No 1; #X text 799 294 Output all link center speed in x or y in a list on outlet No 1; #X text 815 326 Output all norm of link center speed vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X msg 9 290 linkPosXL [\$1]; #X msg 10 309 linkPosYL [\$1]; #X msg 10 327 linkPosNormL [\$1]; #X msg 11 381 linkLengthL [\$1]; #X msg 11 400 linkLengthXL [\$1]; #X msg 11 419 linkLengthYL [\$1]; #X msg 14 494 linkPosSpeedL [\$1]; #X msg 14 513 linkPosSpeedXL [\$1]; #X msg 13 532 linkPosSpeedYL [\$1]; #X msg 12 550 linkPosSpeedNormL [\$1]; #X msg 12 610 linkLengthSpeedL [\$1]; #X msg 12 629 linkLengthSpeedXL [\$1]; #X msg 12 648 linkLengthSpeedYL [\$1]; #X msg 615 38 linkPosT \$1 [\$2]; #X msg 615 57 linkPosXT \$1 [\$2]; #X msg 615 75 linkPosYT \$1 [\$2]; #X msg 614 94 linkPosNormT \$1 [\$2]; #X msg 616 152 linkLengthT \$1 [\$2]; #X msg 616 171 linkLengthXT \$1 [\$2]; #X msg 616 190 linkLengthYT \$1 [\$2]; #X msg 615 208 linkLengthNormT \$1 [\$2]; #X msg 616 259 linkPosSpeedT \$1 [\$2]; #X msg 616 278 linkPosSpeedXT \$1 [\$2]; #X msg 616 297 linkPosSpeedYT \$1 [\$2]; #X msg 616 315 linkPosSpeedNormT \$1 [\$2]; #X msg 614 376 linkLengthSpeedT \$1 [\$2]; #X msg 613 395 linkLengthSpeedXT \$1 [\$2]; #X msg 614 414 linkLengthSpeedYT \$1 [\$2]; #X obj 8 88 cnv 15 150 100 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 172 93 \$1 : id float or symbol of masses (nothing for all) ; #X text 172 153 \$1 : id float or symbol of masses (nothing for all) ; #X msg 12 96 linkPos [\$1]; #X msg 12 156 linkEnd [\$1]; #X text 173 113 output a message for every links :; #X text 173 173 output a message for every links :; #X obj 2 69 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 5 69 generic :; #X msg 10 437 linkLengthNormL [\$1]; #X msg 13 667 linkLengthSpeedNormL [\$1]; #X msg 615 433 linkLengthSpeedNormT \$1 [\$2]; #X obj 614 543 cnv 15 150 200 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 608 522 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 611 522 tables :; #X msg 628 551 linkEndT \$1 [\$2]; #X text 790 551 Put position of the 2 link end on a table [\$1] \, filter on link id is possible; #X msg 640 571 linkEnd1T \$1 [\$2]; #X msg 639 591 linkEnd2T \$1 [\$2]; #X msg 638 612 linkEndXT \$1 [\$2]; #X msg 638 631 linkEnd1XT \$1 [\$2]; #X msg 638 651 linkEnd2XT \$1 [\$2]; #X msg 639 673 linkEndYT \$1 [\$2]; #X msg 641 693 linkEnd1YT \$1 [\$2]; #X msg 640 713 linkEnd2YT \$1 [\$2]; #X msg 9 271 linkPosL [\$1); #X text 202 130 linkPos symbolId number centerX centerY; #X text 172 189 linkEnd symbolId number posX1 posY1 posX2 posY2; #X text 795 583 table is posX1 posY1 posX2 posY2 ....; #X restore 12 469 pd links_attributes ___; #N canvas 111 129 967 626 creation____________ 0; #X obj 5 75 cnv 15 450 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 5 3 cnv 15 450 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 7 2 CREATION Messages; #X obj 4 157 cnv 15 450 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 3 371 cnv 15 450 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X msg 32 104 reset; #X text 202 187 Add a mass; #X text 57 211 \$1 : Id (symbol); #X text 57 231 \$2 : fixed or mobile (0/1); #X text 57 249 \$3 : mass; #X text 7 157 Masses :; #X text 7 74 Reset :; #X text 129 105 Delete all masses \, links and internal variables; #X text 6 371 Links :; #X text 49 426 \$1 : Id (symbol); #X text 49 479 \$4 : rigidity; #X text 49 426 \$1 : Id (symbol); #X text 49 479 \$4 : rigidity; #X text 49 444 \$2 : creation No/Id of mass1; #X text 49 462 \$3 : creation No/Id of mass2; #X text 266 404 Add link(s); #X text 49 497 \$5 : damping; #X text 10 28 Creation messages are used to define the structure of the model. Messages create links and masses or destroy them.; #X msg 32 187 mass \$1 \$2 \$3 \$4 \$5; #X text 57 267 \$4 \, \$5 : initial position; #X obj 471 75 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 501 75 cnv 15 450 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 471 578 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X text 527 180 \$1 : Id (symbol); #X text 527 233 \$4 : rigidity; #X text 527 180 \$1 : Id (symbol); #X text 527 233 \$4 : rigidity; #X text 527 198 \$2 : creation No/Id of mass1; #X text 527 216 \$3 : creation No/Id of mass2; #X text 527 251 \$5 : damping; #X text 790 152 Add tangential link(s); #X text 506 102 In 2D (and 3D) there are two specials links : oriented links. They works as general links excepts their calculation is made following a vector.; #X text 526 270 \$6 \, \$7 : tangential vector (x \, y); #X text 504 75 Oriented links :; #X msg 502 406 tabLink \$1 \$2 \$3 \$4 \$5 \$6 \$7; #X text 532 453 \$1 : Id (symbol); #X text 532 453 \$1 : Id (symbol); #X text 532 471 \$2 : creation No/Id of mass1; #X text 532 489 \$3 : creation No/Id of mass2; #X text 527 434 Add non linear link(s); #X text 530 506 \$4 : table name for the rigidity; #X text 530 524 \$5 : length of the table; #X text 530 542 \$6 : table name for the damping; #X text 529 561 \$7 : length of the table; #X obj 494 351 cnv 15 450 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 497 351 Table links :; #X msg 33 131 print; #X text 103 131 post surrent physical model topology; #X msg 30 404 link \$1 \$2 \$3 \$4 \$5 [\$6 [\$7 [\$8]]]; #X msg 507 153 tLink \$1 \$2 \$3 \$4 \$5 \$6 \$7 [\$8 [\$9 [\$10]]] ; #X text 524 289 [\$8] : Power of the rigidity distance; #X text 524 308 [\$9] : minimum lenght of link; #X text 524 325 [\$10] : maximum lenght of link; #X text 46 515 [\$6] : Power of the rigidity distance; #X text 46 534 [\$7] : minimum lenght of link; #X text 46 551 [\$8] : maximum lenght of link; #X connect 25 0 27 0; #X restore 12 407 pd creation____________; #N canvas 98 120 1133 862 dynamic 0; #X obj 5 3 cnv 15 550 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 10 85 cnv 15 150 750 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 4 62 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 574 86 cnv 15 130 740 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 567 62 cnv 15 550 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 7 62 Masses :; #X text 570 62 Links :; #X text 7 2 DYNAMIC SETTINGS Messages; #X text 191 168 Add force on mass(es); #X msg 30 183 forceX \$1 \$2; #X text 190 114 \$1 : Id (symbol) or No; #X text 193 185 \$1 : Id (symbol) or No; #X msg 29 311 setMobile \$1; #X msg 29 332 setFixed \$1; #X text 190 96 Set position of fixed mass(es); #X text 177 248 Set minimimum and maximum position of all masses; #X text 188 311 Set mass to mobile or fixed; #X msg 593 150 setD \$1 \$2; #X text 748 136 \$2 : New value; #X msg 593 99 setK \$1 \$2; #X text 748 192 \$2 : New value; #X text 748 245 \$2 : New value; #X text 742 100 Set rigidity of link(s); #X text 742 156 Set damping of link(s); #X msg 593 205 setL \$1 \$2; #X text 742 209 Set initial lenght of link(s); #X text 748 118 \$1 : Id (symbol) or No; #X text 748 174 \$1 : Id (symbol) or No; #X text 748 227 \$1 : Id (symbol) or No; #X text 191 328 \$1 : Id (symbol) or No; #X text 10 25 Dynamic settings messages allows the user to redefine internal parameters of links and masses.; #X msg 29 358 grabMass \$1 \$2 \$3; #X msg 30 204 forceY \$1 \$2; #X text 191 445 \$2 : New Id; #X msg 30 413 setMassId \$1 \$2; #X text 182 412 Change the Id of a mass; #X text 192 428 \$1 : mass (number or Id); #X msg 23 530 setSpeed \$1 \$2; #X text 186 482 \$1 : Id (symbol) or No; #X text 183 465 set force on mass(es); #X text 185 549 \$1 : Id (symbol) or No; #X text 182 532 set speed of a mass(es); #X text 184 610 \$1 : Id (symbol) or No; #X text 181 593 add pos of a mass(es); #X text 183 654 grab a mass \, and move it; #X text 196 388 \$3 : grab or not (0 or 1); #X msg 24 462 setForce \$1 \$2 \$3; #X text 186 500 \$2 / \$3 : Value; #X msg 24 482 setForceX \$1 \$2; #X msg 24 501 setForceY \$1 \$2; #X text 190 132 \$2 / \$3 : Value; #X msg 30 163 force \$1 \$2 \$3; #X text 191 203 \$2 / \$3 : Value; #X text 180 264 \$1 / \$2 : Value; #X msg 23 549 setSpeedX \$1 \$2; #X msg 23 568 setSpeedY \$1 \$2; #X text 185 566 \$2 / \$3 : Value; #X text 185 628 \$2 / \$3 : Value; #X msg 24 593 addPos \$1 \$2 \$3; #X msg 588 346 setLinkId \$1 \$2; #X text 742 347 Change the Id of a link; #X text 743 364 \$1 : link (number or Id); #X text 746 381 \$2 : New Id; #X msg 586 406 setLKTab \$1 \$2; #X text 745 406 change the table (K) size of a non linear link; #X text 746 426 \$1 : link (number or Id); #X text 747 443 \$2 : New KL; #X text 746 488 \$1 : link (number or Id); #X msg 586 468 setLDTab \$1 \$2; #X text 745 468 change the table (D) size of a non linear link; #X text 747 505 \$2 : New DL; #X msg 31 225 min \$1 \$2; #X msg 31 245 max \$1 \$2; #X msg 24 612 addPosX \$1 \$2; #X msg 24 632 addPosY \$1 \$2; #X text 580 778 if only 1 argument is previded \, message generally used this argument as the value applayed to all masses (or link); #X text 186 769 \$2 : damping; #X text 185 754 \$1 : Id (symbol) or No; #X msg 22 738 setDEnvOffset \$1 \$2; #X text 174 738 Change environement damping offset; #X text 173 683 Change environement damping; #X msg 23 683 setDEnv \$1 \$2; #X text 185 714 \$2 : damping; #X text 184 699 \$1 : Id (symbol) or No; #X msg 31 265 minX \$1; #X msg 90 265 maxX \$1; #X msg 31 287 minY \$1; #X msg 90 287 maxY \$1; #X msg 31 96 setPos \$1 \$2 \$3; #X msg 31 116 setPosX \$1 \$2; #X msg 31 137 setPosY \$1 \$2; #X text 721 272 Set initial lenght of link(s); #X text 727 290 \$1 : Id (symbol) or No; #X msg 581 271 setLCurrent \$1 [\$2]; #X text 727 308 \$2 : mix between link size (0) and curent length (1) ; #X text 722 326 if no \$2 arg is provide \, then L is set to curent length; #X text 746 596 \$1 : link (number or Id); #X text 745 552 \$1 : link (number or Id); #X msg 586 576 setActive \$1 \$2; #X msg 585 532 setInactive \$1 \$2; #X text 744 532 did not compute a link anymore; #X text 745 576 compute the link at each bang; #X text 741 663 \$1 : link (number or Id); #X msg 586 620 setOverdamp \$1 \$2; #X text 741 677 \$2 : overdamp value; #X text 740 621 Change the overdamp of a link. i.e a strange parametter that amplifie forces that oposed to movment. Use at your own risk. ; #X text 743 724 \$1 : link (number or Id); #X msg 588 705 setEnd \$1 \$2 \$3; #X text 742 740 \$2 : mass number for end 1; #X text 742 707 Change the masses a link is connected to; #X text 741 756 \$3 : mass number for end 2; #X msg 600 728 setEnd1 \$1 \$2; #X msg 600 750 setEnd2 \$1 \$2; #X text 181 352 Grab nearest mass and move it; #X text 196 372 \$1 \$2 : position; #X restore 12 428 pd dynamic settings ___; #X text 112 658 54_pmpd2dtest.pd; #X obj 307 274 print; #N canvas 298 136 1221 757 masses_attributes___ 0; #X obj 5 75 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 5 3 cnv 15 590 15 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 10 378 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 4 357 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 7 74 General :; #X text 7 2 ATTRIBUTES Messages; #X text 7 357 Lists :; #X text 170 390 Output all masses positions in a list on outlet No 1; #X text 15 30 The attributes messages ask the object to output some of his internal parameters. They can be output by lists for positions and forces of masses.; #X text 172 619 Output all forces applied on masses in a list on outlet No 1; #X text 170 422 Output all masses x or y in a list on outlet No 1; #X text 170 450 Output all norm of position vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X obj 11 492 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 171 504 Output all masses speeds in a list on outlet No 1; #X text 172 536 Output all masses speeds in x or y in a list on outlet No 1; #X text 171 564 Output all norm of speed vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X obj 11 605 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 175 649 Output all masses forces in x or y in a list on outlet No 1; #X text 171 677 Output all norm of forces vector (sqrt(x*x+y*y)) in a list on outlet No 1; #X obj 611 26 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 605 5 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X obj 612 140 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 612 253 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X text 794 35 Output all masses positions in a table (\$1); #X text 794 67 Output all masses x or y in a table (\$1); #X text 794 95 Output all norm of position vector (sqrt(x*x+y*y)) in a table (\$1); #X text 174 718 \$1 (optional): Masses Id; #X text 815 376 \$2 (optional): Masses Id; #X text 814 363 \$1 : table name; #X text 608 5 tables :; #X text 799 263 Output all forces applied on masses in a table; #X text 798 294 Output all masses forces in x or y in a table; #X text 795 149 Output all masses speeds in a table; #X text 796 181 Output all masses speeds in x or y in a table; #X text 801 209 Output all norm of speed vector (sqrt(x*x+y*y)) in a table; #X text 804 322 Output all norm of forces vector (sqrt(x*x+y*y)) in a table; #X obj 10 157 cnv 15 150 150 empty empty empty 20 12 0 14 -233017 -66577 0; #X msg 14 165 massPos [\$1]; #X text 187 166 \$1 : id float or symbol of masses (nothing for all) ; #X text 188 186 output a message for every masses :; #X text 218 203 massPos symbolId number posX posY posZ; #X text 187 226 \$1 : id float or symbol of masses (nothing for all) ; #X text 188 246 output a message for every masses :; #X text 218 263 massPos symbolId number speedX speedY speedZ; #X text 187 285 \$1 : id float or symbol of masses (nothing for all) ; #X text 188 301 output a message for every masses :; #X msg 14 284 massForce [\$1]; #X text 218 318 massPos symbolId number forceX forceY forceZ; #X msg 14 225 massSpeed [\$1]; #X msg 13 383 massPosL [\$1]; #X msg 13 402 massPosXL [\$1]; #X msg 13 421 massPosYL [\$1]; #X msg 13 439 massesPosNormL [\$1]; #X msg 14 498 massSpeedL [\$1]; #X msg 15 517 massSpeedXL [\$1]; #X msg 14 535 massSpeedYL [\$1]; #X msg 15 554 massSpeedsNormL [\$1]; #X msg 18 611 massForceL [\$1]; #X msg 16 630 massForceXL [\$1]; #X msg 16 649 massForceYL [\$1]; #X msg 15 667 massForceNormL [\$1]; #X msg 619 38 massPosT \$1 [\$2]; #X msg 619 57 massPosXT \$1 [\$2]; #X msg 619 76 massPosYT \$1 [\$2]; #X msg 618 94 massPosNormT \$1 [\$2]; #X msg 620 152 massSpeedsT \$1 [\$2]; #X msg 620 171 massSpeedsXT \$1 [\$2]; #X msg 620 190 massSpeedsYT \$1 [\$2]; #X msg 620 208 massSpeedsNormT \$1 [\$2]; #X msg 621 259 massForcesT \$1 [\$2]; #X msg 620 278 massForcesXT \$1 [\$2]; #X msg 620 297 massForcesYT \$1 [\$2]; #X msg 620 315 massSpeedsNormT \$1 [\$2]; #X obj 611 561 cnv 15 150 110 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 609 539 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 790 568 output the closest mass; #X text 612 539 others :; #X text 789 582 \$1 : x -position; #X text 789 597 \$2 : y -position; #X text 781 648 output a series of message :; #X msg 618 647 massDistance [\$1 [\$2]]; #X text 796 662 distance mass1 mass2 distanceX \, distanceY \, distanceZ \, distance; #X obj 608 410 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 768 464 \$1 : table name; #X text 767 483 \$2 : masses name; #X text 766 441 apply a force to masses. Force come from a table; #X obj 609 431 cnv 15 150 80 empty empty empty 20 12 0 14 -233017 -66577 0; #X msg 617 438 forceXT \$1 [\$2]; #X msg 618 458 forceYT \$1 [\$2]; #X msg 622 570 closestMass \$1 \$2 \$3 [\$4]; #X text 611 410 Table in:; #X text 789 614 \$3 : none or Id; #X restore 12 449 pd masses_attributes___; #N canvas 909 146 770 592 tests 0; #X msg 20 26 testMass testId filterId filter_parametter ...; #X text 315 29 output a message for every masses that pass all the tests:; #X text 265 52 testMass testId mass_number; #X text 327 92 output a list with 0 or 1 for every masses depending if it pass all test or not; #X text 344 125 testMassL filterID 0/1 0/1 0/1 ...; #X msg 22 154 testMassT tab_name filterId filter_parametter ...; #X msg 22 93 testMassL testId filterId filter_parametter ....; #X text 341 153 Put in a table 0 or 1 depending if masses pass all tests; #X text 38 191 masses test can be :; #X msg 19 344 testLink testId filterId filter_parametter ...; #X msg 21 411 testLinkL testId filterId filter_parametter ....; #X msg 21 472 testLinkT tab_name filterId filter_parametter ...; #X text 314 347 output a message for every links that pass all the tests:; #X text 264 370 testLink testId mass_number; #X text 342 442 testLinkL filterID 0/1 0/1 0/1 ...; #X text 340 471 Put in a table 0 or 1 depending if links pass all tests ; #X text 326 410 output a list with 0 or 1 for every links depending if it pass all test or not; #X text 35 509 links test can be :; #X text 180 191 Id \$1 / posXSup \$1 / posXInf \$1 / posYSup \$1 / posYInf \$1 / speedXSup \$1 / speedXInf \$1 / speedYSup \$1 / speedYInf \$1 / speedSup \$1 / speedInf \$1 / distanceCircleSup \$1 \$2 \$3 \$4 (centerX \, centerY \, distance) / distanceCircleInf \$1 \$2 \$3 \$4 (centerX \, centerY \, distance) / massSup \$1 / massInf \$1 / forceSup \$1 / forceInf \$1 / forceXSup \$1 / forceXInf \$1 / forceYSup \$1 / forceYInf \$1; #X text 177 509 Id \$1 / forceSup \$1 / forceInf \$1 / forceXSup \$1 / forceXInf \$1 / forceYSup \$1 / forceYInf \$1 / lengthSup \$1 / lengthInf \$1 / lengthXSup \$1 / lengthXInf \$1 / lengthYSup \$1 / lengthYInf \$1 / connectedTo \$1 (symbol or float); #X restore 12 490 pd tests ______________; #X text 188 493 To test specific parametters; #N canvas 989 194 547 405 interactors 0; #X text 28 58 \$1 : mess Id (float or symbol) to apply this interactor ; #X text 27 71 \$2 \$3 : center of the circle; #X text 26 85 \$4 : circle radius; #X text 26 99 \$5 : K; #X text 26 112 \$6 : power of the force; #X text 24 231 \$1 : mass Id (float or symbol) to apply this interactor ; #X text 23 244 \$2 \$3 : 1st point off the line; #X text 22 258 \$4 \$5 : 2nd point of the line; #X text 23 272 \$6 : K; #X text 23 287 \$7 : power of the force; #X text 22 302 \$8 : minimum profund of the interactor; #X text 21 317 \$9 : maximum profund of the interactor; #X msg 12 206 iLine \$1 \$2 \$3 \$4 \$5 \$6 [\$7 [\$8 [\$9 ]]]; #X text 26 126 \$7 : K tengential; #X text 26 140 \$8 : power of the tengential force; #X text 25 156 \$9 : minimum radius of the interactor; #X text 24 170 \$10 : maximum radius of the interactor; #X msg 16 24 iCircle \$1 \$2 \$3 \$4 \$5 [\$6 [\$7 [\$8 [\$9 [\$10 ]]]]]; #X restore 12 509 pd interactors ________; #N canvas 890 232 700 758 statistics 0; #X obj 25 41 cnv 15 150 270 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 19 21 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 185 70 \$1 : none or Id; #X text 186 113 \$1 : none or Id; #X text 185 163 \$1 : none or Id; #X text 187 194 \$1 : none or Id; #X text 185 242 \$1 : none or Id; #X text 186 279 \$1 : none or Id; #X msg 30 54 massPosMean; #X msg 31 92 massPosStd \$1; #X msg 30 141 massForceMean; #X msg 30 179 massForceStd \$1; #X msg 31 228 massSpeedMean; #X msg 30 262 massSpeedStd \$1; #X text 181 54 output the average position of masses and center distance ; #X text 182 91 output the standard deviation of masses position and center distance; #X text 182 178 output the standard deviation of masses force; #X text 181 263 output the standard deviation of masses velocity; #X text 22 21 masses :; #X obj 29 357 cnv 15 150 350 empty empty empty 20 12 0 14 -233017 -66577 0; #X obj 23 337 cnv 15 590 15 empty empty empty 20 12 0 14 -158509 -66577 0; #X text 191 389 \$1 : none or Id; #X text 190 421 \$1 : none or Id; #X text 192 467 \$1 : none or Id; #X text 194 504 \$1 : none or Id; #X text 187 562 \$1 : none or Id; #X text 193 597 \$1 : none or Id; #X msg 38 402 linkPosStd \$1; #X msg 37 489 linkLengthStd \$1; #X msg 37 572 linkPosSpeedStd \$1; #X text 194 637 \$1 : none or Id; #X text 196 674 \$1 : none or Id; #X msg 38 658 linkLengthSpeedStd \$1; #X msg 37 364 linkPosMean \$1; #X msg 37 450 linkLengthMean \$1; #X msg 38 538 linkPosSpeedMean \$1; #X msg 39 618 linkLengthSpeedMean \$1; #X text 189 404 output the standard deviation of link center position ; #X text 189 488 output the standard deviation of links length; #X text 192 572 output the standard deviation of links center position velocity; #X text 191 658 output the standard deviation of links length change ; #X text 26 337 links :; #X text 181 141 output the average force applyed to masses (X \, Y and Norm); #X text 181 226 output the average velocity of masses (X \, Y \, Norm) ; #X text 188 361 output the average position of links center (X \, Y \, center disdance); #X text 188 451 output the average links length (X \, Y \, L); #X text 188 536 output the average center position velocity of links (X \, Y \, Norm); #X text 190 619 output the average change in links length (X \, Y \, Norm); #X restore 13 531 pd statistics _________; #X text 185 510 To send complex forces; #X text 187 533 To get statistical data of the simulation; #X connect 21 0 39 0; #X connect 24 0 23 0; #X connect 25 0 50 0; #X connect 26 0 19 0; #X connect 39 0 20 0; #X connect 40 0 22 0; #X connect 41 0 40 0; #X connect 43 0 42 0; #X connect 45 0 42 0; #X connect 50 0 44 0; #X connect 50 1 44 1; #X connect 50 2 58 0;