diff options
Diffstat (limited to 'msd3D/01_msd3Dtest.pd')
-rw-r--r-- | msd3D/01_msd3Dtest.pd | 351 |
1 files changed, 167 insertions, 184 deletions
diff --git a/msd3D/01_msd3Dtest.pd b/msd3D/01_msd3Dtest.pd index a40907f..744adf2 100644 --- a/msd3D/01_msd3Dtest.pd +++ b/msd3D/01_msd3Dtest.pd @@ -1,133 +1,53 @@ -#N canvas 524 22 867 806 10; -#X obj 32 13 loadbang; -#X obj 294 522 print msd; -#X obj 642 647 gemwin; -#X msg 642 625 0 \, destroy; -#X obj 532 707 gemhead; -#X obj 532 730 world_light; -#X msg 642 562 reset \, create \, lighting 1 \, 1; -#X obj 102 13 cnv 15 500 270 empty empty empty 20 12 0 14 -262131 -66577 -0; -#X obj 115 259 t a; -#X obj 115 18 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262131 -1 +#N canvas 499 22 653 522 10; +#X obj 27 26 loadbang; +#X obj 127 419 print msd; +#X obj 263 104 gemwin; +#X msg 278 81 0 \, destroy; +#X text 260 26 2 DRAG THE STRUCTURE WITH THE MOUSE; +#X obj 87 27 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; -#X msg 187 69 reset; -#X text 153 19 reset; -#X obj 115 40 t b b b b b; -#X msg 133 158 50 50; -#X obj 30 290 cnv 15 572 80 empty empty empty 20 12 0 14 -261689 -66577 -0; -#X obj 33 298 gemhead; -#X obj 33 321 t b; -#X msg 33 343 bang \, get massesPos \, get linksPos; -#X text 393 85 CREATION : 3 MASSES \, 2 LINKS; -#X text 272 311 COMPUTE AND GET ALL MASSES AND LINKS POSITIONS; -#X obj 30 374 cnv 15 572 110 empty empty empty 20 12 0 14 -262131 -66577 -0; -#X msg 65 381 setD souple 0.01; -#X msg 196 382 setK souple 1; -#X msg 65 401 setD souple 1; -#X msg 196 402 setK souple 2; -#X text 331 394 SET RIGIDITY AND VISCOSITY OF LINKS; -#X text 347 440 ADD FORCE ON ALL MOBILE MASSES; -#X obj 27 545 cnv 15 400 200 empty empty empty 20 12 0 14 -261689 -66577 -0; -#N canvas 643 123 617 602 massrender 0; -#X obj 183 15 inlet; +#X msg 90 76 reset; +#X obj 27 47 t b b b b b; +#X msg 42 186 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0; +#X obj 53 300 gemhead; +#X obj 53 323 t b; +#X msg 53 345 bang \, get massesPos \, get linksPos; +#N canvas 643 123 308 285 massrender 0; +#X obj 127 22 inlet; #X obj 48 203 translateXYZ; -#X obj 48 229 sphere 0.1; -#X obj 183 79 / 12.5; -#X obj 183 102 - 4; -#X obj 248 80 / 12.5; -#X obj 248 103 - 4; +#X obj 127 86 / 12.5; +#X obj 127 109 - 4; +#X obj 192 87 / 12.5; +#X obj 192 110 - 4; #X obj 48 177 separator; -#X obj 181 129 t b f; -#X obj 300 80 / 12.5; -#X obj 300 103 - 4; -#X obj 183 50 unpack f f f f; -#X obj 48 148 gemhead 45; -#X obj 48 90 loadbang; -#X msg 48 118 0; +#X obj 125 136 t b f; +#X obj 48 141 gemhead 45; +#X msg 48 104 0; +#X obj 47 58 loadbang; +#X obj 127 57 unpack f f f f; +#X obj 238 88 / 12.5; +#X obj 238 111 - 4; +#X obj 48 229 sphere 0.1; #X connect 0 0 11 0; -#X connect 1 0 2 0; -#X connect 3 0 4 0; -#X connect 4 0 8 0; -#X connect 5 0 6 0; -#X connect 6 0 1 2; -#X connect 7 0 1 0; -#X connect 8 0 12 0; -#X connect 8 1 1 1; -#X connect 9 0 10 0; -#X connect 10 0 1 3; -#X connect 11 1 3 0; -#X connect 11 2 5 0; -#X connect 11 3 9 0; -#X connect 12 0 7 0; -#X connect 13 0 14 0; -#X connect 14 0 12 0; -#X restore 114 589 pd massrender; -#N canvas 284 227 595 566 linkrender 0; -#X obj 113 25 inlet; -#X obj 113 117 / 12.5; -#X obj 113 140 - 4; -#X obj 167 118 / 12.5; -#X obj 167 141 - 4; -#X obj 44 222 separator; -#X obj 113 164 t b f; -#X obj 44 265 curve 2; -#X obj 286 117 / 12.5; -#X obj 286 140 - 4; -#X obj 340 118 / 12.5; -#X obj 340 141 - 4; -#X obj 217 117 / 12.5; -#X obj 217 142 - 4; -#X obj 143 194 pack f f f; -#X msg 143 217 \$1 \$2 \$3; -#X obj 391 118 / 12.5; -#X obj 391 141 - 4; -#X obj 286 189 pack f f f; -#X msg 286 212 \$1 \$2 \$3; -#X obj 113 69 unpack f f f f f f f; -#X obj 44 198 gemhead 45; -#X obj 44 105 loadbang; -#X msg 44 133 0; -#X connect 0 0 20 0; -#X connect 1 0 2 0; -#X connect 2 0 6 0; -#X connect 3 0 4 0; -#X connect 4 0 14 1; -#X connect 5 0 7 0; -#X connect 6 0 21 0; -#X connect 6 1 14 0; -#X connect 8 0 9 0; -#X connect 9 0 18 0; -#X connect 10 0 11 0; -#X connect 11 0 18 1; +#X connect 1 0 14 0; +#X connect 2 0 3 0; +#X connect 3 0 7 0; +#X connect 4 0 5 0; +#X connect 5 0 1 2; +#X connect 6 0 1 0; +#X connect 7 0 8 0; +#X connect 7 1 1 1; +#X connect 8 0 6 0; +#X connect 9 0 8 0; +#X connect 10 0 9 0; +#X connect 11 1 2 0; +#X connect 11 2 4 0; +#X connect 11 3 12 0; #X connect 12 0 13 0; -#X connect 13 0 14 2; -#X connect 14 0 15 0; -#X connect 15 0 7 1; -#X connect 16 0 17 0; -#X connect 17 0 18 2; -#X connect 18 0 19 0; -#X connect 19 0 7 2; -#X connect 20 1 1 0; -#X connect 20 2 3 0; -#X connect 20 3 12 0; -#X connect 20 4 8 0; -#X connect 20 5 10 0; -#X connect 20 6 16 0; -#X connect 21 0 5 0; -#X connect 22 0 23 0; -#X connect 23 0 21 0; -#X restore 33 610 pd linkrender; -#X obj 33 560 route linksPos massesPos; -#X text 241 570 DISPLAY MASSES AND LINKS; -#X text 289 592 WITH GEM; -#X text 445 561 1 CREATE WINDOW -->; -#X text 444 624 3 AND DESTROY IT! -->; -#X text 444 592 2 DRAG THE STRUCTURE WITH THE MOUSE; -#N canvas 731 296 454 304 gemmouse 0; +#X connect 13 0 1 3; +#X restore 436 267 pd massrender; +#X obj 366 244 route linksPos massesPos; +#N canvas 731 296 458 308 gemmouse 0; #X obj 189 77 gemmouse; #X obj 189 184 pack f f; #X obj 189 218 spigot; @@ -137,73 +57,136 @@ #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 141 120 list; +#X obj 141 41 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 10 0; -#X connect 9 0 11 1; -#X connect 10 0 11 0; -#X connect 11 0 3 0; -#X restore 33 672 pd gemmouse; -#X obj 33 651 gemhead; -#X msg 33 693 posX fix \$1; -#X msg 33 714 posY fix \$2; -#X text 184 675 SET FIXED MASS TO MOUSE POSITION; -#X obj 33 497 msd3D --------------------------------; -#X msg 62 440 forceZ mob 200; -#X msg 188 441 forceZ mob -200; -#X msg 151 138 mass mob 1 \$1 \$2 \$3 \$4; -#X msg 133 179 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0 \, Zmax 70 -\, Zmin 0; -#X msg 169 89 mass fix 0 100 50 50 50; -#X msg 115 232 link souple \$1 \$2 5 10; -#X msg 115 211 0 1 \, 1 2; -#X msg 151 114 100 20 10 20 \, 200 20 25 0; -#X connect 0 0 12 0; -#X connect 3 0 2 0; -#X connect 4 0 5 0; -#X connect 6 0 2 0; -#X connect 8 0 41 0; -#X connect 9 0 12 0; -#X connect 10 0 8 0; -#X connect 12 0 48 0; -#X connect 12 1 13 0; -#X connect 12 1 45 0; -#X connect 12 2 49 0; -#X connect 12 3 46 0; -#X connect 12 4 10 0; -#X connect 13 0 36 1; +#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 366 356 pd gemmouse; +#X obj 366 335 gemhead; +#X msg 366 377 posX fix \$1; +#X msg 366 398 posY fix \$2; +#N canvas 0 22 454 304 linkrender 0; +#X obj 127 22 inlet; +#X obj 128 86 / 12.5; +#X obj 128 109 - 4; +#X obj 183 87 / 12.5; +#X obj 183 110 - 4; +#X obj 48 177 separator; +#X obj 128 136 t b f; +#X obj 262 88 / 12.5; +#X obj 262 111 - 4; +#X obj 290 112 / 12.5; +#X obj 290 135 - 4; +#X obj 48 222 curve 2; +#X obj 155 189 pack f f 0; +#X obj 262 192 pack f f 0; +#X obj 48 130 gemhead 45; +#X obj 47 44 loadbang; +#X msg 47 68 0; +#X obj 127 57 unpack f f f f f f f; +#X obj 212 112 / 12.5; +#X obj 212 135 - 4; +#X obj 319 135 / 12.5; +#X obj 319 158 - 4; +#X connect 0 0 17 0; +#X connect 1 0 2 0; +#X connect 2 0 6 0; +#X connect 3 0 4 0; +#X connect 4 0 12 1; +#X connect 5 0 11 0; +#X connect 6 0 14 0; +#X connect 6 1 12 0; +#X connect 7 0 8 0; +#X connect 8 0 13 0; +#X connect 9 0 10 0; +#X connect 10 0 13 1; +#X connect 12 0 11 1; +#X connect 13 0 11 2; +#X connect 14 0 5 0; #X connect 15 0 16 0; -#X connect 16 0 17 0; -#X connect 17 0 41 0; -#X connect 21 0 41 0; -#X connect 22 0 41 0; -#X connect 23 0 41 0; -#X connect 24 0 41 0; -#X connect 30 0 29 0; -#X connect 30 1 28 0; -#X connect 30 2 1 0; -#X connect 36 0 38 0; -#X connect 36 0 39 0; -#X connect 37 0 36 0; -#X connect 38 0 41 0; -#X connect 39 0 41 0; -#X connect 41 0 30 0; -#X connect 41 1 1 0; -#X connect 42 0 41 0; -#X connect 43 0 41 0; -#X connect 44 0 8 0; -#X connect 45 0 8 0; -#X connect 46 0 8 0; -#X connect 47 0 8 0; -#X connect 48 0 47 0; -#X connect 49 0 44 0; +#X connect 16 0 14 0; +#X connect 17 1 1 0; +#X connect 17 2 3 0; +#X connect 17 3 18 0; +#X connect 17 4 7 0; +#X connect 17 5 9 0; +#X connect 17 6 20 0; +#X connect 18 0 19 0; +#X connect 19 0 12 2; +#X connect 20 0 21 0; +#X connect 21 0 13 2; +#X restore 366 289 pd linkrender; +#X msg 206 139 50 50; +#X msg 58 118 40 60 \, 60 60 \, 60 40 \, 40 40; +#X obj 206 162 s mouse_init; +#X msg 27 207 link souple mob mob 10 5; +#X msg 27 230 link souple fix mob 10 5; +#X text 25 1 creation : 5 masses and 20 links; +#X text 52 281 compute and get masses and links positions; +#X text 364 315 move mass to mouse position; +#X text 365 197 display masses with gem; +#X text 261 6 1 CREATE WINDOW; +#X text 108 26 reset struct; +#X obj 90 259 s \$0-msdin; +#X obj 84 373 r \$0-msdin; +#X obj 52 419 s \$0-msdout; +#X obj 365 423 s \$0-msdin; +#X obj 366 218 r \$0-msdout; +#X msg 74 96 mass fix 0 100 50 50 50; +#X msg 58 139 mass mob 1 100 \$1 \$2 50; +#X obj 53 397 msd3D; +#X obj 368 177 s \$0-msdin; +#X msg 369 129 forceZ mob 200; +#X msg 368 153 forceZ mob 200; +#X text 367 108 send vertical forces; +#X msg 263 58 reset \, create \, lighting 1 \, 1; +#X obj 51 454 gemhead; +#X obj 51 476 world_light; +#X connect 0 0 7 0; +#X connect 3 0 2 0; +#X connect 5 0 7 0; +#X connect 6 0 30 0; +#X connect 7 0 22 0; +#X connect 7 1 19 0; +#X connect 7 1 8 0; +#X connect 7 2 20 0; +#X connect 7 3 35 0; +#X connect 7 4 6 0; +#X connect 8 0 30 0; +#X connect 9 0 10 0; +#X connect 10 0 11 0; +#X connect 11 0 37 0; +#X connect 13 0 18 0; +#X connect 13 1 12 0; +#X connect 14 0 16 0; +#X connect 14 0 17 0; +#X connect 15 0 14 0; +#X connect 16 0 33 0; +#X connect 17 0 33 0; +#X connect 19 0 21 0; +#X connect 20 0 36 0; +#X connect 22 0 23 0; +#X connect 22 0 30 0; +#X connect 23 0 30 0; +#X connect 31 0 37 0; +#X connect 34 0 13 0; +#X connect 35 0 30 0; +#X connect 36 0 30 0; +#X connect 37 0 32 0; +#X connect 37 1 1 0; +#X connect 39 0 38 0; +#X connect 40 0 38 0; +#X connect 42 0 2 0; +#X connect 43 0 44 0; |