#N canvas 369 233 467 396 10; #N canvas 271 52 742 855 masses 0; #X obj 62 132 cnv 15 610 180 empty empty CREATION 20 12 0 14 -262131 -66577 0; #X msg 79 161 reset; #X text 249 192 Add a mass; #X text 335 193 \$1 : Id (symbol); #X text 334 213 \$2 : fixed or mobile (0/1); #X text 334 231 \$3 : mass; #X text 251 162 Delete all masses and links; #X obj 62 316 cnv 15 610 60 empty empty COMPUTATION 20 12 0 14 -261689 -66577 0; #X msg 82 345 bang; #X text 235 345 Compute new masses positions; #X obj 61 381 cnv 15 610 210 empty empty DYNAMIC_SETTING 20 12 0 14 -262131 -66577 0; #X text 350 445 \$2 : New value; #X text 348 499 \$2 : New value; #X msg 87 407 posX \$1 \$2; #X text 350 409 Set position of mass(es); #X text 347 464 Add force on mass(es); #X msg 82 458 forceX \$1 \$2; #X obj 61 595 cnv 15 610 245 empty empty GET_ATTRIBUTES 20 12 0 14 -261689 -66577 0; #X text 248 622 output all masses positions in a list on outlet No 1; #X text 246 697 output all masses forces in a list on outlet No 1; #X msg 145 734 get \$1 \$2; #X text 248 735 Get specific attribute; #X text 248 760 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces / linksPos ); #X text 248 797 \$2 : Id (symbol or creations numbers); #X msg 79 268 deleteMass \$1; #X text 248 270 Delete a mass and associated links; #X text 338 287 \$1 : Creation No of mass; #X msg 143 817 infosL; #X text 246 817 Get infos on all masses and links on outlet No 2; #X text 347 533 \$1 : Value; #X text 73 9 MASSES :; #X text 64 45 They got only one physical parameter \, the value of their; #X text 65 59 mass. They can be mobile or fixed \, in this case forces ; #X text 64 30 The msd masses are the principals objects of the model. ; #X text 64 73 applied on them automatically \, by links \, or manually \, by; #X text 65 88 messages \, don't do anything.; #X msg 81 556 setMobile \$1 \, setFixed \$1; #X text 345 556 Change mobile parameter; #X text 345 572 \$1 : Creation No of mass; #X msg 166 407 posY \$1 \$2; #X msg 174 458 forceY \$1 \$2; #X text 347 516 Set minimimum and maximum X \, Y of masses; #X msg 83 503 Xmin \$1 \, Xmax \$1 \, Ymin \$1 \, Ymax \$1; #X msg 79 192 mass \$1 \$2 \$3 \$4 \$5 \$6; #X text 334 249 \$4 \, \$5 \, \$6 : initial position; #X msg 246 407 posZ \$1 \$2; #X msg 83 481 forceZ \$1 \$2; #X msg 83 526 Zmin \$1 \, Zmax \$1; #X obj 33 821 msd3D; #X text 350 427 \$1 : Id (symbol) or No; #X text 348 481 \$1 : Id (symbol) or No; #X text 247 648 output all masses x/y/z positions in a list on outlet No 1; #X msg 147 622 massesPosL; #X msg 146 648 massesPosYL; #X msg 147 670 massesPosZL; #X msg 146 696 massesForcesL; #X msg 67 648 massesPosXL; #X text 64 103 Be careful : if masses are deleted \, lists messages won't work; #X connect 1 0 48 0; #X connect 8 0 48 0; #X connect 13 0 48 0; #X connect 16 0 48 0; #X connect 20 0 48 0; #X connect 24 0 48 0; #X connect 27 0 48 0; #X connect 36 0 48 0; #X connect 42 0 48 0; #X connect 43 0 48 0; #X connect 52 0 48 0; #X connect 53 0 48 0; #X connect 54 0 48 0; #X connect 55 0 48 0; #X connect 56 0 48 0; #X restore 159 305 pd masses; #X text 12 305 HELP on masses --->; #X text 11 336 HELP on links --->; #X text -50 110 There are 4 types of messages for msd :; #X text -49 74 It is designed to implement particules physical model in PD.The model is based on two elements type : mass and link.; #X obj -50 125 cnv 15 420 30 empty empty empty 20 12 0 14 -262131 -66577 0; #X obj -50 158 cnv 15 420 30 empty empty empty 20 12 0 14 -261689 -66577 0; #X obj -50 191 cnv 15 420 30 empty empty empty 20 12 0 14 -262131 -66577 0; #X obj -50 224 cnv 15 420 30 empty empty empty 20 12 0 14 -261689 -66577 0; #X text -47 132 CREATION : To create the model masses and links.; #X text -47 197 DYNAMIC SETTING : To set the model parameters dynamically. ; #X text -47 230 ATTRIBUTES : To get the model parameters.; #X text -47 159 COMPUTATION : To compute the new model state based on previous instant.; #X text 32 16 MSD3D : mass - spring - damper model; #X text -48 61 MSD3D is the 3D object of the msd objects collection. ; #N canvas 222 83 808 841 links 0; #X obj 33 821 msd; #X obj 62 192 cnv 15 610 360 empty empty CREATION 20 12 0 14 -262131 -66577 0; #X msg 79 221 reset; #X text 402 247 \$1 : Id (symbol); #X text 314 247 Add a link; #X text 401 267 \$2 : creation No of mass1; #X text 401 285 \$3 : creation No of mass2; #X text 400 303 \$4 : rigidity; #X text 251 222 Delete all masses and links; #X text 400 321 \$5 : viscosity; #X text 400 338 \$6 : damping; #X obj 61 561 cnv 15 610 82 empty empty DYNAMIC_SETTING 20 12 0 14 -262131 -66577 0; #X msg 172 583 setD \$1 \$2; #X text 354 601 \$1 : Id (symbol); #X text 354 619 \$2 : New value; #X msg 87 583 setK \$1 \$2; #X msg 255 583 setD2 \$1 \$2; #X text 354 583 Set rigidity \, viscosity or damping of link(s); #X obj 60 650 cnv 15 610 140 empty empty GET_ATTRIBUTES 20 12 0 14 -261689 -66577 0; #X msg 75 679 get \$1 \$2; #X text 237 680 Get specific attribute; #X text 237 705 \$1 : Attribute type ( massesPos / massesSpeeds / massesForces / linksPos ); #X text 237 742 \$2 : Id (symbol or creations numbers); #X msg 74 533 deleteLink \$1; #X text 239 535 Delete a link; #X text 340 535 \$1 : Creation No of link; #X msg 73 762 infosL; #X text 236 762 Get infos on all masses and links on outlet No 2; #X text 402 247 \$1 : Id (symbol); #X text 314 247 Add a link; #X text 401 267 \$2 : creation No of mass1; #X text 401 285 \$3 : creation No of mass2; #X text 400 303 \$4 : rigidity; #X text 400 321 \$5 : viscosity; #X text 400 338 \$6 : damping; #X text 463 392 \$1 : Id (symbol); #X text 462 448 \$4 : rigidity; #X text 462 466 \$5 : viscosity; #X text 462 483 \$6 : damping; #X text 463 392 \$1 : Id (symbol); #X text 462 448 \$4 : rigidity; #X text 462 466 \$5 : viscosity; #X text 462 483 \$6 : damping; #X text 301 393 Add an interactor link; #X text 94 52 LINKS :; #X text 71 91 parameters : length \, rigidity \, viscosity and damping. ; #X text 72 78 Links connect masses two by two. They got 4 physicals ; #X text 70 134 the two masses at the creation.; #X text 71 120 message. The lenght is initialised to the distance between ; #X text 71 107 Rigidity \, viscosity and damping are defined by the creation; #X text 70 148 Interactor links are links between mutiples masses \, instead; #X text 70 161 of creation number \, the masses linked are defined with; #X text 69 175 their Id.; #X text 397 356 ($7) : minimum lenght of link; #X text 397 373 ($8) : maximum lenght of link; #X msg 78 247 link \$1 \$2 \$3 \$4 \$5 \$6 ($7 \$8); #X text 462 412 \$2 : Id (symbol) of masses 1; #X text 462 430 \$3 : Id (symbol) of masses 2; #X msg 73 393 iLink \$1 \$2 \$3 \$4 \$5 \$6 ($7 \$8); #X text 458 500 ($7) : minimum lenght of links; #X text 458 517 ($8) : maximum lenght of links; #X connect 2 0 0 0; #X connect 15 0 0 0; #X connect 19 0 0 0; #X connect 23 0 0 0; #X connect 26 0 0 0; #X connect 55 0 0 0; #X connect 58 0 0 0; #X restore 160 335 pd links;