aboutsummaryrefslogtreecommitdiff
path: root/msd3D
diff options
context:
space:
mode:
authorN.N. <nimon@users.sourceforge.net>2005-04-26 16:10:08 +0000
committerN.N. <nimon@users.sourceforge.net>2005-04-26 16:10:08 +0000
commit2d390319a45282ffa6fcc5da41bbac81eb26fb3c (patch)
tree52905a8f94ff4ee05ed30ae6412f13944c7deacd /msd3D
parent3d7f8e6f9f4c708c6130ea0a63c2eb139f34327a (diff)
MSD Version 0.04
svn path=/trunk/externals/nusmuk/; revision=2826
Diffstat (limited to 'msd3D')
-rw-r--r--msd3D/01_msd3Dtest.pd56
-rw-r--r--msd3D/02_msd3Dperf.pd122
-rw-r--r--msd3D/03_msd3Dmemb.pd48
-rw-r--r--msd3D/04_msd3Dfilet.pd114
-rw-r--r--msd3D/05_msd3Dvline.pd428
-rw-r--r--msd3D/help-msd3D.pd26
-rwxr-xr-xmsd3D/main.cpp234
-rw-r--r--msd3D/partiel.pd10
8 files changed, 496 insertions, 542 deletions
diff --git a/msd3D/01_msd3Dtest.pd b/msd3D/01_msd3Dtest.pd
index 7666bad..7213efb 100644
--- a/msd3D/01_msd3Dtest.pd
+++ b/msd3D/01_msd3Dtest.pd
@@ -33,7 +33,7 @@
#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 605 590 massrender 0;
+#N canvas 643 123 605 590 massrender 1;
#X obj 127 22 inlet;
#X obj 48 203 translateXYZ;
#X obj 48 229 sphere 0.1;
@@ -45,10 +45,10 @@
#X obj 48 177 separator;
#X obj 48 153 any;
#X obj 125 136 t b f;
-#X obj 127 57 unpack f f f;
#X obj 244 87 / 12.5;
#X obj 244 110 - 4;
-#X connect 0 0 11 0;
+#X obj 127 57 unpack f f f f;
+#X connect 0 0 13 0;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
#X connect 4 0 10 0;
@@ -59,11 +59,11 @@
#X connect 9 0 8 0;
#X connect 10 0 9 0;
#X connect 10 1 1 1;
-#X connect 11 0 3 0;
-#X connect 11 1 5 0;
-#X connect 11 2 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 1 3;
+#X connect 11 0 12 0;
+#X connect 12 0 1 3;
+#X connect 13 1 3 0;
+#X connect 13 2 5 0;
+#X connect 13 3 11 0;
#X restore 114 589 pd massrender;
#N canvas 284 227 587 558 linkrender 0;
#X obj 93 25 inlet;
@@ -80,7 +80,6 @@
#X obj 266 140 - 4;
#X obj 320 118 / 12.5;
#X obj 320 141 - 4;
-#X obj 93 69 unpack f f f f f f;
#X obj 197 117 / 12.5;
#X obj 197 142 - 4;
#X obj 123 194 pack f f f;
@@ -89,34 +88,35 @@
#X obj 371 141 - 4;
#X obj 266 189 pack f f f;
#X msg 266 212 \$1 \$2 \$3;
-#X connect 0 0 14 0;
+#X obj 93 69 unpack f f f f f f f;
+#X connect 0 0 22 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
-#X connect 4 0 17 1;
+#X connect 4 0 16 1;
#X connect 5 0 7 1;
#X connect 6 0 9 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
-#X connect 8 1 17 0;
+#X connect 8 1 16 0;
#X connect 10 0 11 0;
-#X connect 11 0 21 0;
+#X connect 11 0 20 0;
#X connect 12 0 13 0;
-#X connect 13 0 21 1;
-#X connect 14 0 1 0;
-#X connect 14 1 3 0;
-#X connect 14 2 15 0;
-#X connect 14 3 10 0;
-#X connect 14 4 12 0;
-#X connect 14 5 19 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 2;
-#X connect 17 0 18 0;
-#X connect 18 0 9 1;
-#X connect 19 0 20 0;
-#X connect 20 0 21 2;
-#X connect 21 0 22 0;
-#X connect 22 0 9 2;
+#X connect 13 0 20 1;
+#X connect 14 0 15 0;
+#X connect 15 0 16 2;
+#X connect 16 0 17 0;
+#X connect 17 0 9 1;
+#X connect 18 0 19 0;
+#X connect 19 0 20 2;
+#X connect 20 0 21 0;
+#X connect 21 0 9 2;
+#X connect 22 1 1 0;
+#X connect 22 2 3 0;
+#X connect 22 3 14 0;
+#X connect 22 4 10 0;
+#X connect 22 5 12 0;
+#X connect 22 6 18 0;
#X restore 33 610 pd linkrender;
#X obj 33 560 route linksPos massesPos;
#X text 241 570 DISPLAY MASSES AND LINKS;
diff --git a/msd3D/02_msd3Dperf.pd b/msd3D/02_msd3Dperf.pd
index 097974b..cd1d59c 100644
--- a/msd3D/02_msd3Dperf.pd
+++ b/msd3D/02_msd3Dperf.pd
@@ -6,7 +6,6 @@
#X obj 37 10 loadbang;
#X text 197 96 reset;
#X obj 159 27 t b b b b b;
-#X obj 313 605 print msd;
#X msg 456 528 0 \, destroy;
#X obj 456 583 gemhead;
#X obj 456 606 world_light;
@@ -24,12 +23,12 @@
#X obj 48 177 separator;
#X obj 48 153 any;
#X obj 125 136 t b f;
-#X obj 127 57 unpack f f f;
#X obj 247 86 / 12.5;
#X obj 247 109 - 4;
#X obj 48 229 sphere 0.07;
-#X connect 0 0 10 0;
-#X connect 1 0 13 0;
+#X obj 127 57 unpack f f f f;
+#X connect 0 0 13 0;
+#X connect 1 0 12 0;
#X connect 2 0 3 0;
#X connect 3 0 9 0;
#X connect 4 0 5 0;
@@ -39,11 +38,11 @@
#X connect 8 0 7 0;
#X connect 9 0 8 0;
#X connect 9 1 1 1;
-#X connect 10 0 2 0;
-#X connect 10 1 4 0;
-#X connect 10 2 11 0;
-#X connect 11 0 12 0;
-#X connect 12 0 1 3;
+#X connect 10 0 11 0;
+#X connect 11 0 1 3;
+#X connect 13 1 2 0;
+#X connect 13 2 4 0;
+#X connect 13 3 10 0;
#X restore 52 625 pd massrender;
#X obj 425 254 random 100;
#X msg 425 233 seed 1;
@@ -82,64 +81,63 @@
#X msg 143 479 forceX mob 100;
#X msg 143 503 forceX mob -100;
#X msg 459 20 900;
-#X connect 0 0 32 0;
+#X connect 0 0 31 0;
#X connect 1 0 5 0;
#X connect 2 0 0 0;
#X connect 3 0 5 0;
-#X connect 5 0 41 0;
-#X connect 5 1 38 0;
-#X connect 5 2 40 0;
-#X connect 5 3 10 0;
+#X connect 5 0 40 0;
+#X connect 5 1 37 0;
+#X connect 5 2 39 0;
+#X connect 5 3 9 0;
#X connect 5 4 2 0;
-#X connect 5 4 26 0;
-#X connect 5 4 19 0;
-#X connect 5 4 15 0;
+#X connect 5 4 25 0;
#X connect 5 4 18 0;
-#X connect 5 4 35 0;
-#X connect 7 0 31 0;
-#X connect 8 0 9 0;
-#X connect 10 0 0 0;
-#X connect 11 0 31 0;
-#X connect 11 0 43 0;
-#X connect 12 0 45 0;
-#X connect 14 0 36 2;
-#X connect 15 0 14 0;
-#X connect 16 0 36 1;
-#X connect 17 0 20 0;
+#X connect 5 4 14 0;
+#X connect 5 4 17 0;
+#X connect 5 4 34 0;
+#X connect 6 0 30 0;
+#X connect 7 0 8 0;
+#X connect 9 0 0 0;
+#X connect 10 0 30 0;
+#X connect 10 0 42 0;
+#X connect 11 0 44 0;
+#X connect 13 0 35 2;
+#X connect 14 0 13 0;
+#X connect 15 0 35 1;
+#X connect 16 0 19 0;
+#X connect 17 0 15 0;
#X connect 18 0 16 0;
-#X connect 19 0 17 0;
-#X connect 20 0 36 0;
-#X connect 21 0 27 0;
-#X connect 22 0 24 0;
-#X connect 22 0 25 0;
+#X connect 19 0 35 0;
+#X connect 20 0 26 0;
+#X connect 21 0 23 0;
+#X connect 21 0 24 0;
+#X connect 21 0 26 1;
#X connect 22 0 27 1;
-#X connect 23 0 28 1;
-#X connect 24 0 23 1;
-#X connect 25 0 28 0;
-#X connect 25 1 23 0;
-#X connect 26 0 27 1;
-#X connect 27 0 22 0;
-#X connect 28 0 29 0;
-#X connect 29 0 0 0;
-#X connect 30 0 12 0;
-#X connect 32 0 44 0;
-#X connect 32 1 6 0;
-#X connect 33 0 17 0;
-#X connect 33 1 16 0;
-#X connect 33 1 34 0;
-#X connect 33 2 14 0;
-#X connect 34 0 36 3;
-#X connect 35 0 34 0;
-#X connect 36 0 37 0;
+#X connect 23 0 22 1;
+#X connect 24 0 27 0;
+#X connect 24 1 22 0;
+#X connect 25 0 26 1;
+#X connect 26 0 21 0;
+#X connect 27 0 28 0;
+#X connect 28 0 0 0;
+#X connect 29 0 11 0;
+#X connect 31 0 43 0;
+#X connect 32 0 16 0;
+#X connect 32 1 15 0;
+#X connect 32 1 33 0;
+#X connect 32 2 13 0;
+#X connect 33 0 35 3;
+#X connect 34 0 33 0;
+#X connect 35 0 36 0;
+#X connect 36 0 0 0;
#X connect 37 0 0 0;
-#X connect 38 0 0 0;
-#X connect 39 0 31 0;
-#X connect 40 0 33 0;
-#X connect 41 0 21 0;
-#X connect 43 0 39 0;
-#X connect 44 0 13 0;
-#X connect 45 0 32 0;
-#X connect 47 0 32 0;
-#X connect 48 0 32 0;
-#X connect 49 0 40 1;
-#X connect 49 0 41 1;
+#X connect 38 0 30 0;
+#X connect 39 0 32 0;
+#X connect 40 0 20 0;
+#X connect 42 0 38 0;
+#X connect 43 0 12 0;
+#X connect 44 0 31 0;
+#X connect 46 0 31 0;
+#X connect 47 0 31 0;
+#X connect 48 0 39 1;
+#X connect 48 0 40 1;
diff --git a/msd3D/03_msd3Dmemb.pd b/msd3D/03_msd3Dmemb.pd
index ad45d13..766c86b 100644
--- a/msd3D/03_msd3Dmemb.pd
+++ b/msd3D/03_msd3Dmemb.pd
@@ -31,7 +31,6 @@
#X obj 266 140 - 4;
#X obj 320 118 / 12.5;
#X obj 320 141 - 4;
-#X obj 93 69 unpack f f f f f f;
#X obj 197 117 / 12.5;
#X obj 197 142 - 4;
#X obj 123 194 pack f f f;
@@ -40,34 +39,35 @@
#X obj 371 141 - 4;
#X obj 266 189 pack f f f;
#X msg 266 212 \$1 \$2 \$3;
-#X connect 0 0 14 0;
+#X obj 93 69 unpack f f f f f f f;
+#X connect 0 0 22 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
-#X connect 4 0 17 1;
+#X connect 4 0 16 1;
#X connect 5 0 7 1;
#X connect 6 0 9 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
-#X connect 8 1 17 0;
+#X connect 8 1 16 0;
#X connect 10 0 11 0;
-#X connect 11 0 21 0;
+#X connect 11 0 20 0;
#X connect 12 0 13 0;
-#X connect 13 0 21 1;
-#X connect 14 0 1 0;
-#X connect 14 1 3 0;
-#X connect 14 2 15 0;
-#X connect 14 3 10 0;
-#X connect 14 4 12 0;
-#X connect 14 5 19 0;
-#X connect 15 0 16 0;
-#X connect 16 0 17 2;
-#X connect 17 0 18 0;
-#X connect 18 0 9 1;
-#X connect 19 0 20 0;
-#X connect 20 0 21 2;
-#X connect 21 0 22 0;
-#X connect 22 0 9 2;
+#X connect 13 0 20 1;
+#X connect 14 0 15 0;
+#X connect 15 0 16 2;
+#X connect 16 0 17 0;
+#X connect 17 0 9 1;
+#X connect 18 0 19 0;
+#X connect 19 0 20 2;
+#X connect 20 0 21 0;
+#X connect 21 0 9 2;
+#X connect 22 1 1 0;
+#X connect 22 2 3 0;
+#X connect 22 3 14 0;
+#X connect 22 4 10 0;
+#X connect 22 5 12 0;
+#X connect 22 6 18 0;
#X restore 33 666 pd linkrender;
#X obj 33 616 msd3D --------------------------------;
#X msg 62 559 forceZ mob 200;
@@ -90,7 +90,7 @@
#X msg 466 646 view 4 0 0.5 0 0 0 0 0 1;
#X obj 312 479 f;
#X floatatom 333 456 5 0 0 0 - - -;
-#X obj 312 403 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
+#X obj 312 403 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
#X msg 312 504 forceZ mob \$1;
#X obj 312 423 metro 65;
@@ -101,9 +101,9 @@
#X msg 184 82 mass fix 0 100 30 30 40 \, mass fix 0 100 30 70 40 \,
mass fix 0 100 70 30 40 \, mass fix 0 100 70 70 40;
#X msg 527 543 posZ fix \$1;
-#X obj 527 402 vsl 15 128 0 70 0 0 empty empty empty 0 -8 0 8 -262144
--1 -1 3000 1;
-#X text 573 463 Change altitude of corners;
+#X obj 527 402 vsl 15 128 0 70 0 0 empty empty empty 0 -8 0 8 -262131
+-1 -1 0 1;
+#X text 559 457 Change altitude of corners;
#X obj 33 427 t b b b;
#X text 385 455 Amplitude;
#X text 362 619 Create window;
diff --git a/msd3D/04_msd3Dfilet.pd b/msd3D/04_msd3Dfilet.pd
index 69d801b..a233122 100644
--- a/msd3D/04_msd3Dfilet.pd
+++ b/msd3D/04_msd3Dfilet.pd
@@ -1,6 +1,5 @@
#N canvas 482 80 863 802 10;
#X obj 32 13 loadbang;
-#X obj 294 522 print msd;
#X obj 458 439 gemwin;
#X msg 458 417 0 \, destroy;
#X obj 457 469 gemhead;
@@ -14,7 +13,7 @@
#X obj 33 298 gemhead;
#X obj 33 321 t b;
#X msg 33 343 bang \, get massesPos \, get linksPos;
-#N canvas 643 123 605 590 massrender 0;
+#N canvas 643 123 605 590 massrender 1;
#X obj 127 22 inlet;
#X obj 48 203 translateXYZ;
#X obj 48 229 sphere 0.1;
@@ -26,10 +25,10 @@
#X obj 48 177 separator;
#X obj 48 153 any;
#X obj 125 136 t b f;
-#X obj 127 57 unpack f f f;
#X obj 246 88 / 12.5;
#X obj 246 111 - 4;
-#X connect 0 0 11 0;
+#X obj 127 57 unpack f f f f;
+#X connect 0 0 13 0;
#X connect 1 0 2 0;
#X connect 3 0 4 0;
#X connect 4 0 10 0;
@@ -40,11 +39,11 @@
#X connect 9 0 8 0;
#X connect 10 0 9 0;
#X connect 10 1 1 1;
-#X connect 11 0 3 0;
-#X connect 11 1 5 0;
-#X connect 11 2 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 1 3;
+#X connect 11 0 12 0;
+#X connect 12 0 1 3;
+#X connect 13 1 3 0;
+#X connect 13 2 5 0;
+#X connect 13 3 11 0;
#X restore 114 589 pd massrender;
#N canvas 284 227 587 558 linkrender 0;
#X obj 93 25 inlet;
@@ -56,12 +55,10 @@
#X obj 44 222 separator;
#X obj 44 192 any;
#X obj 93 164 t b f;
-#X obj 44 265 curve 2;
#X obj 266 117 / 12.5;
#X obj 266 140 - 4;
#X obj 320 118 / 12.5;
#X obj 320 141 - 4;
-#X obj 93 69 unpack f f f f f f;
#X obj 197 117 / 12.5;
#X obj 197 142 - 4;
#X obj 123 194 pack f f f;
@@ -70,77 +67,78 @@
#X obj 371 141 - 4;
#X obj 266 189 pack f f f;
#X msg 266 212 \$1 \$2 \$3;
-#X connect 0 0 14 0;
+#X obj 44 265 curve 2;
+#X obj 93 69 unpack f f f f f f f;
+#X connect 0 0 22 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
-#X connect 4 0 17 1;
+#X connect 4 0 15 1;
#X connect 5 0 7 1;
-#X connect 6 0 9 0;
+#X connect 6 0 21 0;
#X connect 7 0 6 0;
#X connect 8 0 7 0;
-#X connect 8 1 17 0;
-#X connect 10 0 11 0;
-#X connect 11 0 21 0;
-#X connect 12 0 13 0;
-#X connect 13 0 21 1;
-#X connect 14 0 1 0;
-#X connect 14 1 3 0;
-#X connect 14 2 15 0;
-#X connect 14 3 10 0;
-#X connect 14 4 12 0;
-#X connect 14 5 19 0;
+#X connect 8 1 15 0;
+#X connect 9 0 10 0;
+#X connect 10 0 19 0;
+#X connect 11 0 12 0;
+#X connect 12 0 19 1;
+#X connect 13 0 14 0;
+#X connect 14 0 15 2;
#X connect 15 0 16 0;
-#X connect 16 0 17 2;
+#X connect 16 0 21 1;
#X connect 17 0 18 0;
-#X connect 18 0 9 1;
+#X connect 18 0 19 2;
#X connect 19 0 20 0;
#X connect 20 0 21 2;
-#X connect 21 0 22 0;
-#X connect 22 0 9 2;
+#X connect 22 1 1 0;
+#X connect 22 2 3 0;
+#X connect 22 3 13 0;
+#X connect 22 4 9 0;
+#X connect 22 5 11 0;
+#X connect 22 6 17 0;
#X restore 33 610 pd linkrender;
#X obj 33 539 route linksPos massesPos;
#X msg 458 392 view 0 4 0 0 0 0 0 0 1;
#X msg 203 83 symbol reset;
#X obj 33 497 msd3D --------------------------------;
-#X msg 32 410 forceZ filet -0.2;
+#X msg 107 430 forceZ filet -0.2;
#X msg 145 173 Xmax 100 \, Xmin 0 \, Ymax 100 \, Ymin 0 \, Zmax 70
\, Zmin -40;
#X msg 164 140 setFixed 62 \, setFixed 87 \, setFixed 512 \, setFixed
537;
-#X msg 458 371 view 0 0 4 0 0 0 0 1 0;
#X obj 183 113 filet 20 30 2 2 20 30;
#X msg 458 349 view 4 0 0.5 0 0 0 0 0 1;
#X text 187 408 Ambient force;
#X text 648 380 Select view;
#X obj 145 38 t b b b b;
-#X text 383 114 Filet abstraction : x0 y0 stepx stepy nx ny;
#X text 244 587 Connect mass or link to be viewed \, or both with good
computer!;
-#X connect 0 0 28 0;
-#X connect 3 0 2 0;
-#X connect 4 0 5 0;
-#X connect 6 0 2 0;
-#X connect 7 0 19 0;
-#X connect 8 0 28 0;
-#X connect 9 0 7 0;
+#X text 383 114 Filet abstraction : x0 y0 stepx stepy ny nx;
+#X msg 458 371 view 0 0 2 0 0 0 0 1 0;
+#X connect 0 0 26 0;
+#X connect 2 0 1 0;
+#X connect 3 0 4 0;
+#X connect 5 0 1 0;
+#X connect 6 0 18 0;
+#X connect 7 0 26 0;
+#X connect 8 0 6 0;
+#X connect 10 0 11 0;
#X connect 11 0 12 0;
-#X connect 12 0 13 0;
-#X connect 13 0 19 0;
-#X connect 13 0 20 0;
-#X connect 16 1 14 0;
-#X connect 17 0 2 0;
-#X connect 18 0 24 1;
-#X connect 19 0 16 0;
-#X connect 19 1 1 0;
-#X connect 20 0 19 0;
-#X connect 21 0 7 0;
-#X connect 22 0 7 0;
-#X connect 23 0 2 0;
-#X connect 24 0 7 0;
-#X connect 25 0 2 0;
-#X connect 28 0 21 0;
-#X connect 28 1 22 0;
-#X connect 28 2 24 0;
-#X connect 28 3 9 0;
-#X connect 28 3 18 0;
+#X connect 12 0 19 0;
+#X connect 12 0 18 0;
+#X connect 15 1 13 0;
+#X connect 16 0 1 0;
+#X connect 17 0 22 1;
+#X connect 18 0 15 0;
+#X connect 19 0 18 0;
+#X connect 20 0 6 0;
+#X connect 21 0 6 0;
+#X connect 22 0 6 0;
+#X connect 23 0 1 0;
+#X connect 26 0 20 0;
+#X connect 26 1 21 0;
+#X connect 26 2 22 0;
+#X connect 26 3 8 0;
+#X connect 26 3 17 0;
+#X connect 29 0 1 0;
diff --git a/msd3D/05_msd3Dvline.pd b/msd3D/05_msd3Dvline.pd
index 97f038d..9300589 100644
--- a/msd3D/05_msd3Dvline.pd
+++ b/msd3D/05_msd3Dvline.pd
@@ -1,6 +1,5 @@
#N canvas 499 155 796 654 10;
#X obj 32 13 loadbang;
-#X obj 294 522 print msd;
#X obj 457 430 gemwin;
#X msg 457 408 0 \, destroy;
#X obj 288 577 gemhead;
@@ -15,20 +14,19 @@
#X text 156 412 Ambient force;
#X obj 146 42 t b b b b;
#X msg 296 393 forceZ filet \$1;
-#X obj 444 207 tgl 20 0 empty empty empty 0 -6 0 8 -262131 -1 -1 0
+#X obj 444 207 tgl 20 0 empty empty empty 0 -6 0 8 -262131 -1 -1 1
1;
#X obj 444 258 f;
#X obj 444 234 metro 65;
#X msg 326 468 setD fil 1;
-#X obj 33 257 t b b b b b;
#X msg 457 327 reset \, dimen 800 800 \, create \, lighting 1 \, 1
;
#X obj 421 221 vsl 15 128 -1 1 0 0 empty empty empty 0 -8 0 8 -262131
--1 -1 0 1;
+-1 -1 11000 1;
#X obj 206 315 sin;
#X obj 206 335 *;
#X obj 206 255 counter 0 360;
-#X obj 206 204 tgl 20 0 empty empty empty 0 -6 0 8 -262131 -1 -1 0
+#X obj 206 204 tgl 20 0 empty empty empty 0 -6 0 8 -262131 -1 -1 1
1;
#X obj 206 275 / 3.6;
#X obj 206 295 * 6.28319;
@@ -55,7 +53,6 @@
#X restore 33 359 pd getmmasses;
#N canvas 224 164 901 724 synthese 0;
#X obj 232 66 inlet;
-#X obj 232 88 unpack f f f;
#X obj 232 176 pack f f f f;
#X obj 231 316 partiel;
#N canvas 582 426 450 300 drone 0;
@@ -87,69 +84,19 @@
#X connect 12 0 11 0;
#X connect 13 0 5 0;
#X connect 13 1 8 0;
-#X restore 375 627 pd drone;
+#X restore 627 480 pd drone;
#X obj 232 154 t f f;
#X msg 143 113 reset;
#X obj 87 64 loadbang;
#X obj 173 49 r resban;
#X obj 232 110 t b f;
-#N canvas 669 177 562 569 noise 0;
-#X obj 176 62 inlet;
-#X obj 285 493 outlet~;
-#X msg 176 84 \$1;
-#X obj 176 105 abs;
-#X obj 302 190 line~;
-#X obj 285 472 *~;
-#X obj 176 149 t b;
-#X obj 248 149 t b;
-#X obj 147 425 noise~;
-#X msg 162 197 \$3;
-#X obj 162 218 abs;
-#X obj 162 239 * 50;
-#X obj 148 445 moog~;
-#X obj 179 404 sig~;
-#X obj 162 260 + 0;
-#X obj 162 351 sig~;
-#X obj 177 126 moses 0.008;
-#X msg 179 379 1;
-#X obj 162 282 max 0.5;
-#X obj 162 304 min 2.5;
-#X floatatom 245 389 5 0 0 0 - - -;
-#X msg 302 166 0.5 5;
-#X obj 162 330 * 900;
-#X msg 176 173 0 20;
-#X connect 0 0 2 0;
-#X connect 0 0 9 0;
-#X connect 2 0 3 0;
-#X connect 3 0 16 0;
-#X connect 4 0 5 1;
-#X connect 5 0 1 0;
-#X connect 6 0 23 0;
-#X connect 7 0 21 0;
-#X connect 8 0 12 0;
-#X connect 9 0 10 0;
-#X connect 10 0 11 0;
-#X connect 11 0 14 0;
-#X connect 12 0 5 0;
-#X connect 13 0 12 2;
-#X connect 14 0 18 0;
-#X connect 15 0 12 1;
-#X connect 16 0 6 0;
-#X connect 16 1 7 0;
-#X connect 17 0 13 0;
-#X connect 18 0 19 0;
-#X connect 19 0 22 0;
-#X connect 20 0 13 0;
-#X connect 21 0 4 0;
-#X connect 22 0 15 0;
-#X connect 23 0 4 0;
-#X restore 479 643 pd noise;
-#X obj 521 497 hip~ 20;
+#X obj 521 498 hip~ 20;
#X obj 401 501 hip~ 20;
#X obj 443 563 dac~;
#X obj 232 132 counter 0 29;
#X obj 235 254 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29;
+#X obj 232 88 unpack f f f f;
#X obj 288 385 partiel;
#X obj 250 339 partiel;
#X obj 269 362 partiel;
@@ -179,156 +126,143 @@
#X obj 708 383 partiel;
#X obj 710 313 partiel;
#X obj 729 336 partiel;
-#X connect 0 0 1 0;
-#X connect 1 0 9 0;
-#X connect 1 1 2 2;
-#X connect 1 2 2 3;
-#X connect 2 0 15 0;
-#X connect 3 0 11 0;
-#X connect 4 0 12 0;
-#X connect 4 0 11 0;
-#X connect 5 0 2 0;
-#X connect 6 0 14 0;
-#X connect 7 0 6 0;
-#X connect 8 0 6 0;
-#X connect 9 0 14 0;
-#X connect 9 1 2 1;
-#X connect 11 0 13 1;
-#X connect 12 0 13 0;
-#X connect 14 0 5 0;
-#X connect 15 0 3 0;
-#X connect 15 1 17 0;
-#X connect 15 2 18 0;
-#X connect 15 3 16 0;
-#X connect 15 4 19 0;
-#X connect 15 5 20 0;
-#X connect 15 6 21 0;
-#X connect 15 7 22 0;
-#X connect 15 8 23 0;
-#X connect 15 9 24 0;
-#X connect 15 10 25 0;
-#X connect 15 11 26 0;
-#X connect 15 12 27 0;
-#X connect 15 13 28 0;
-#X connect 15 14 29 0;
-#X connect 15 15 30 0;
-#X connect 15 16 31 0;
-#X connect 15 17 32 0;
-#X connect 15 18 33 0;
-#X connect 15 19 34 0;
-#X connect 15 20 35 0;
-#X connect 15 21 36 0;
-#X connect 15 22 37 0;
-#X connect 15 23 38 0;
-#X connect 15 24 39 0;
-#X connect 15 25 40 0;
-#X connect 15 26 41 0;
-#X connect 15 27 42 0;
-#X connect 15 28 43 0;
-#X connect 15 29 44 0;
-#X connect 16 0 12 0;
-#X connect 17 0 12 0;
-#X connect 18 0 11 0;
-#X connect 19 0 11 0;
-#X connect 20 0 12 0;
-#X connect 21 0 11 0;
-#X connect 22 0 12 0;
-#X connect 23 0 11 0;
-#X connect 24 0 12 0;
-#X connect 25 0 11 0;
-#X connect 26 0 12 0;
-#X connect 27 0 11 0;
-#X connect 28 0 12 0;
-#X connect 29 0 11 0;
-#X connect 30 0 12 0;
-#X connect 31 0 11 0;
-#X connect 32 0 12 0;
-#X connect 33 0 11 0;
-#X connect 34 0 12 0;
-#X connect 35 0 11 0;
-#X connect 36 0 12 0;
-#X connect 37 0 11 0;
-#X connect 38 0 12 0;
-#X connect 39 0 11 0;
-#X connect 40 0 12 0;
-#X connect 41 0 11 0;
-#X connect 42 0 12 0;
-#X connect 43 0 11 0;
-#X connect 44 0 12 0;
+#X connect 0 0 14 0;
+#X connect 1 0 13 0;
+#X connect 2 0 9 0;
+#X connect 3 0 10 0;
+#X connect 3 0 9 0;
+#X connect 4 0 1 0;
+#X connect 5 0 12 0;
+#X connect 6 0 5 0;
+#X connect 7 0 5 0;
+#X connect 8 0 12 0;
+#X connect 8 1 1 1;
+#X connect 9 0 11 1;
+#X connect 10 0 11 0;
+#X connect 12 0 4 0;
+#X connect 13 0 2 0;
+#X connect 13 1 16 0;
+#X connect 13 2 17 0;
+#X connect 13 3 15 0;
+#X connect 13 4 18 0;
+#X connect 13 5 19 0;
+#X connect 13 6 20 0;
+#X connect 13 7 21 0;
+#X connect 13 8 22 0;
+#X connect 13 9 23 0;
+#X connect 13 10 24 0;
+#X connect 13 11 25 0;
+#X connect 13 12 26 0;
+#X connect 13 13 27 0;
+#X connect 13 14 28 0;
+#X connect 13 15 29 0;
+#X connect 13 16 30 0;
+#X connect 13 17 31 0;
+#X connect 13 18 32 0;
+#X connect 13 19 33 0;
+#X connect 13 20 34 0;
+#X connect 13 21 35 0;
+#X connect 13 22 36 0;
+#X connect 13 23 37 0;
+#X connect 13 24 38 0;
+#X connect 13 25 39 0;
+#X connect 13 26 40 0;
+#X connect 13 27 41 0;
+#X connect 13 28 42 0;
+#X connect 13 29 43 0;
+#X connect 14 1 8 0;
+#X connect 14 2 1 2;
+#X connect 14 3 1 3;
+#X connect 15 0 10 0;
+#X connect 16 0 10 0;
+#X connect 17 0 9 0;
+#X connect 18 0 9 0;
+#X connect 19 0 10 0;
+#X connect 20 0 9 0;
+#X connect 21 0 10 0;
+#X connect 22 0 9 0;
+#X connect 23 0 10 0;
+#X connect 24 0 9 0;
+#X connect 25 0 10 0;
+#X connect 26 0 9 0;
+#X connect 27 0 10 0;
+#X connect 28 0 9 0;
+#X connect 29 0 10 0;
+#X connect 30 0 9 0;
+#X connect 31 0 10 0;
+#X connect 32 0 9 0;
+#X connect 33 0 10 0;
+#X connect 34 0 9 0;
+#X connect 35 0 10 0;
+#X connect 36 0 9 0;
+#X connect 37 0 10 0;
+#X connect 38 0 9 0;
+#X connect 39 0 10 0;
+#X connect 40 0 9 0;
+#X connect 41 0 10 0;
+#X connect 42 0 9 0;
+#X connect 43 0 10 0;
#X restore 33 572 pd synthese;
#X obj 183 219 vsl 15 128 0 30 0 0 empty empty empty 0 -8 0 8 -262131
--1 -1 0 1;
+-1 -1 10100 1;
#N canvas 571 334 938 386 massrender 0;
#X obj 286 2 inlet;
#X obj 35 134 gemhead;
#X obj 44 192 any;
-#X obj 382 3 inlet;
-#X obj 304 88 f 0;
-#X obj 304 129 + 1;
-#X obj 443 184 pack f f f f;
-#X obj 461 153 unpack f f f;
-#X obj 282 24 t b b a;
-#X msg 383 68 0;
-#X obj 304 108 t f f;
-#X obj 303 152 % 30;
+#X obj 306 144 pack f f f f;
+#X obj 306 99 % 30;
#X obj 55 227 route 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19 20 21 22 23 24 25 26 27 28 29;
-#X obj 211 189 sel 0;
+#X obj 306 119 sel 0;
#X obj 44 288 curve16 ---------------------------------------------
;
+#X obj 306 74 unpack f f f f;
#X connect 0 0 8 0;
#X connect 1 0 2 1;
-#X connect 2 0 14 0;
-#X connect 3 0 9 0;
-#X connect 4 0 10 0;
-#X connect 5 0 11 0;
-#X connect 6 0 12 0;
-#X connect 7 0 6 1;
-#X connect 7 1 6 2;
-#X connect 7 2 6 3;
-#X connect 8 1 4 0;
-#X connect 8 2 7 0;
-#X connect 9 0 4 1;
-#X connect 10 0 5 0;
-#X connect 10 1 6 0;
-#X connect 11 0 4 1;
-#X connect 11 0 13 0;
-#X connect 12 0 14 1;
-#X connect 12 1 14 2;
-#X connect 12 2 14 3;
-#X connect 12 3 14 4;
-#X connect 12 4 14 5;
-#X connect 12 5 14 6;
-#X connect 12 6 14 7;
-#X connect 12 7 14 8;
-#X connect 12 8 14 9;
-#X connect 12 9 14 10;
-#X connect 12 10 14 11;
-#X connect 12 11 14 12;
-#X connect 12 12 14 13;
-#X connect 12 13 14 14;
-#X connect 12 14 14 15;
-#X connect 12 15 14 16;
-#X connect 12 16 14 17;
-#X connect 12 17 14 18;
-#X connect 12 18 14 19;
-#X connect 12 19 14 20;
-#X connect 12 20 14 21;
-#X connect 12 21 14 22;
-#X connect 12 22 14 23;
-#X connect 12 23 14 24;
-#X connect 12 24 14 25;
-#X connect 12 25 14 26;
-#X connect 12 26 14 27;
-#X connect 12 27 14 28;
-#X connect 12 28 14 29;
-#X connect 12 29 14 30;
-#X connect 13 0 2 0;
+#X connect 2 0 7 0;
+#X connect 3 0 5 0;
+#X connect 4 0 6 0;
+#X connect 4 0 3 0;
+#X connect 5 0 7 1;
+#X connect 5 1 7 2;
+#X connect 5 2 7 3;
+#X connect 5 3 7 4;
+#X connect 5 4 7 5;
+#X connect 5 5 7 6;
+#X connect 5 6 7 7;
+#X connect 5 7 7 8;
+#X connect 5 8 7 9;
+#X connect 5 9 7 10;
+#X connect 5 10 7 11;
+#X connect 5 11 7 12;
+#X connect 5 12 7 13;
+#X connect 5 13 7 14;
+#X connect 5 14 7 15;
+#X connect 5 15 7 16;
+#X connect 5 16 7 17;
+#X connect 5 17 7 18;
+#X connect 5 18 7 19;
+#X connect 5 19 7 20;
+#X connect 5 20 7 21;
+#X connect 5 21 7 22;
+#X connect 5 22 7 23;
+#X connect 5 23 7 24;
+#X connect 5 24 7 25;
+#X connect 5 25 7 26;
+#X connect 5 26 7 27;
+#X connect 5 27 7 28;
+#X connect 5 28 7 29;
+#X connect 5 29 7 30;
+#X connect 6 0 2 0;
+#X connect 8 0 4 0;
+#X connect 8 1 3 1;
+#X connect 8 2 3 2;
+#X connect 8 3 3 3;
#X restore 135 573 pd massrender;
#X msg 165 140 setFixed 0 \, setFixed 29 \, setFixed 420 \, setFixed
449;
#X text 459 114 Filet abstraction : x0 y0 stepx stepy ny nx;
-#X text 484 206 <-- Add constant force;
+#X text 483 206 <-- Add constant force;
#X text 240 204 <-- Add sinus force;
#X text 136 360 Get middles masses;
#X obj 457 348 t b;
@@ -348,58 +282,56 @@ Zmin -6;
#X msg 457 369 view 0 0 11 0 0 0 1 0 0;
#X msg 33 443 get massesPos;
#X obj 33 539 route massesPosNo massesPos;
-#X connect 0 0 13 0;
-#X connect 3 0 2 0;
-#X connect 4 0 5 0;
-#X connect 6 0 11 0;
-#X connect 7 0 13 0;
-#X connect 8 0 6 0;
-#X connect 9 0 19 0;
-#X connect 10 0 40 1;
-#X connect 11 0 53 0;
-#X connect 11 1 1 0;
-#X connect 13 0 50 0;
-#X connect 13 0 42 0;
-#X connect 13 1 33 0;
-#X connect 13 2 40 0;
-#X connect 13 3 8 0;
-#X connect 13 3 10 0;
-#X connect 14 0 11 0;
-#X connect 15 0 17 0;
-#X connect 16 0 14 0;
-#X connect 17 0 16 0;
-#X connect 18 0 11 0;
-#X connect 19 0 11 0;
-#X connect 19 0 29 0;
-#X connect 19 0 52 0;
-#X connect 19 0 48 0;
-#X connect 19 1 32 1;
-#X connect 19 2 29 0;
-#X connect 19 2 52 0;
-#X connect 19 3 32 1;
-#X connect 20 0 2 0;
-#X connect 20 0 38 0;
-#X connect 21 0 16 1;
-#X connect 22 0 23 0;
-#X connect 23 0 14 0;
-#X connect 24 0 26 0;
-#X connect 25 0 28 0;
-#X connect 26 0 27 0;
-#X connect 27 0 22 0;
-#X connect 28 0 24 0;
-#X connect 29 0 49 0;
-#X connect 31 0 23 1;
-#X connect 33 0 6 0;
-#X connect 38 0 51 0;
-#X connect 40 0 6 0;
-#X connect 41 0 11 0;
-#X connect 43 0 11 0;
-#X connect 44 0 11 0;
-#X connect 46 0 2 0;
-#X connect 48 0 11 0;
-#X connect 49 0 11 0;
-#X connect 50 0 6 0;
-#X connect 51 0 2 0;
-#X connect 52 0 11 0;
-#X connect 53 0 30 0;
-#X connect 53 1 32 0;
+#X obj 33 257 t b b;
+#X connect 0 0 12 0;
+#X connect 2 0 1 0;
+#X connect 3 0 4 0;
+#X connect 5 0 10 0;
+#X connect 6 0 12 0;
+#X connect 7 0 5 0;
+#X connect 8 0 52 0;
+#X connect 9 0 38 1;
+#X connect 10 0 51 0;
+#X connect 12 0 48 0;
+#X connect 12 0 40 0;
+#X connect 12 1 31 0;
+#X connect 12 2 38 0;
+#X connect 12 3 7 0;
+#X connect 12 3 9 0;
+#X connect 13 0 10 0;
+#X connect 14 0 16 0;
+#X connect 15 0 13 0;
+#X connect 16 0 15 0;
+#X connect 17 0 10 0;
+#X connect 18 0 1 0;
+#X connect 18 0 36 0;
+#X connect 19 0 15 1;
+#X connect 20 0 21 0;
+#X connect 21 0 13 0;
+#X connect 22 0 24 0;
+#X connect 23 0 26 0;
+#X connect 24 0 25 0;
+#X connect 25 0 20 0;
+#X connect 26 0 22 0;
+#X connect 27 0 47 0;
+#X connect 29 0 21 1;
+#X connect 31 0 5 0;
+#X connect 36 0 49 0;
+#X connect 38 0 5 0;
+#X connect 39 0 10 0;
+#X connect 41 0 10 0;
+#X connect 42 0 10 0;
+#X connect 44 0 1 0;
+#X connect 46 0 10 0;
+#X connect 47 0 10 0;
+#X connect 48 0 5 0;
+#X connect 49 0 1 0;
+#X connect 50 0 10 0;
+#X connect 51 0 28 0;
+#X connect 51 1 30 0;
+#X connect 52 0 10 0;
+#X connect 52 0 27 0;
+#X connect 52 0 50 0;
+#X connect 52 0 46 0;
+#X connect 52 1 27 0;
+#X connect 52 1 10 0;
diff --git a/msd3D/help-msd3D.pd b/msd3D/help-msd3D.pd
index 406396f..53382b5 100644
--- a/msd3D/help-msd3D.pd
+++ b/msd3D/help-msd3D.pd
@@ -14,7 +14,6 @@
#X text 235 367 Compute new masses positions;
#X obj 61 403 cnv 15 610 210 empty empty DYNAMIC_SETTING 20 12 0 14
-262131 -66577 0;
-#X text 350 449 \$1 : Id (symbol);
#X text 350 467 \$2 : New value;
#X text 348 503 \$1 : Id (symbol);
#X text 348 521 \$2 : New value;
@@ -63,18 +62,19 @@ their;
#X msg 83 503 forceZ \$1 \$2;
#X msg 83 548 Zmin \$1 \, Zmax \$1;
#X obj 33 821 msd3D;
-#X connect 1 0 52 0;
-#X connect 8 0 52 0;
-#X connect 15 0 52 0;
-#X connect 18 0 52 0;
-#X connect 20 0 52 0;
-#X connect 21 0 52 0;
-#X connect 24 0 52 0;
-#X connect 28 0 52 0;
-#X connect 31 0 52 0;
-#X connect 40 0 52 0;
-#X connect 46 0 52 0;
-#X connect 47 0 52 0;
+#X text 350 449 \$1 : Id (symbol) or No;
+#X connect 1 0 51 0;
+#X connect 8 0 51 0;
+#X connect 14 0 51 0;
+#X connect 17 0 51 0;
+#X connect 19 0 51 0;
+#X connect 20 0 51 0;
+#X connect 23 0 51 0;
+#X connect 27 0 51 0;
+#X connect 30 0 51 0;
+#X connect 39 0 51 0;
+#X connect 45 0 51 0;
+#X connect 46 0 51 0;
#X restore 158 305 pd masses;
#X text 12 305 HELP on masses --->;
#X text 11 336 HELP on links --->;
diff --git a/msd3D/main.cpp b/msd3D/main.cpp
index c235776..7b0d2f4 100755
--- a/msd3D/main.cpp
+++ b/msd3D/main.cpp
@@ -30,7 +30,7 @@
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- Version 0.03 -- 21.04.2005
+ Version 0.04 -- 26.04.2005
*/
// include flext header
@@ -38,7 +38,7 @@
#include <math.h>
// define constants
-#define MSD3D_VERSION 0.03
+#define MSD3D_VERSION 0.04
#define nb_max_link 4000
#define nb_max_mass 4000
#define Id_length 20
@@ -480,50 +480,64 @@ protected:
{
t_atom sortie[7], aux[2];
t_int i;
-
- if (argc < 6 || argc > 8)
- error("link : Id Nomass1 Nomass2 K D1 D2 (Lmin Lmax)");
- link[nb_link] = new t_link; // New pointer
- link[nb_link]->Id = GetSymbol(argv[0]); // ID
- for (i=0; i<nb_mass;i++)
- if (mass[i]->nbr==GetAInt(argv[1])) // pointer to mass1
- link[nb_link]->mass1 = mass[i];
- else if(mass[i]->nbr==GetAInt(argv[2])) // pointer to mass2
- link[nb_link]->mass2 = mass[i];
- link[nb_link]->K1 = GetFloat(argv[3]); // K1
- link[nb_link]->D1 = GetFloat(argv[4]); // D1
- link[nb_link]->D2 = GetFloat(argv[5]); // D2
- link[nb_link]->longx = link[nb_link]->mass1->posX - link[nb_link]->mass2->posX; // Lx[0]
- link[nb_link]->longy = link[nb_link]->mass1->posY - link[nb_link]->mass2->posY; // Ly[0]
- link[nb_link]->longz = link[nb_link]->mass1->posZ - link[nb_link]->mass2->posZ; // Lz[0]
- link[nb_link]->longueur = sqrt(pow(link[nb_link]->longx,2)+pow(link[nb_link]->longy,2)+pow(link[nb_link]->longz,2));//L[0]
- link[nb_link]->nbr = id_link; // id number
- link[nb_link]->distance_old = link[nb_link]->longueur; // L[n-1]
- switch (argc) {
- case 6 :
- link[nb_link]->long_max = 32768;
- link[nb_link]->long_min = 0;
- break;
- case 7 :
- link[nb_link]->long_min = GetFloat(argv[6]);
- link[nb_link]->long_max = 32768;
- break;
- case 8 :
- link[nb_link]->long_min = GetFloat(argv[6]);
- link[nb_link]->long_max = GetFloat(argv[7]);
- break;
- }
- nb_link++;
- id_link++;
- nb_link = min ( nb_max_link -1, nb_link );
- SetFloat((sortie[0]),id_link-1);
- SetSymbol((sortie[1]),link[nb_link-1]->Id);
- SetFloat((sortie[2]),GetInt(argv[1]));
- SetFloat((sortie[3]),GetInt(argv[2]));
- SetFloat((sortie[4]),link[nb_link-1]->K1);
- SetFloat((sortie[5]),link[nb_link-1]->D1);
- SetFloat((sortie[6]),link[nb_link-1]->D2);
- ToOutAnything(1,S_Link,7,sortie);
+ t_mass *mass1 = NULL;
+ t_mass *mass2 = NULL;
+
+ if (argc < 6 || argc > 8)
+ error("link : Id Nomass1 Nomass2 K D1 D2 (Lmin Lmax)");
+
+ // check for existence of link masses:
+ for (i=0; i<nb_mass;i++)
+ if (mass[i]->nbr==GetInt(argv[1])) // pointer to mass1
+ // we found mass1
+ mass1 = mass[i];
+ else if (mass[i]->nbr==GetInt(argv[2])) // pointer to mass2
+ // ... and mass2
+ mass2 = mass[i];
+
+ if (mass1 and mass2)
+ {
+ link[nb_link] = new t_link; // New pointer
+ link[nb_link]->Id = GetSymbol(argv[0]); // ID
+ link[nb_link]->mass1 = mass1; // pointer to mass1
+ link[nb_link]->mass2 = mass2; // pointer to mass2
+ link[nb_link]->K1 = GetFloat(argv[3]); // K1
+ link[nb_link]->D1 = GetFloat(argv[4]); // D1
+ link[nb_link]->D2 = GetFloat(argv[5]); // D2
+ link[nb_link]->longx = link[nb_link]->mass1->posX - link[nb_link]->mass2->posX; // Lx[0]
+ link[nb_link]->longy = link[nb_link]->mass1->posY - link[nb_link]->mass2->posY; // Ly[0]
+ link[nb_link]->longz = link[nb_link]->mass1->posZ - link[nb_link]->mass2->posZ; // Lz[0]
+ link[nb_link]->longueur = sqrt(pow(link[nb_link]->longx,2)+pow(link[nb_link]->longy,2)+pow(link[nb_link]->longz,2));//L[0]
+ link[nb_link]->nbr = id_link; // id number
+ link[nb_link]->distance_old = link[nb_link]->longueur; // L[n-1]
+ switch (argc) {
+ case 6 :
+ link[nb_link]->long_max = 32768;
+ link[nb_link]->long_min = 0;
+ break;
+ case 7 :
+ link[nb_link]->long_min = GetFloat(argv[6]);
+ link[nb_link]->long_max = 32768;
+ break;
+ case 8 :
+ link[nb_link]->long_min = GetFloat(argv[6]);
+ link[nb_link]->long_max = GetFloat(argv[7]);
+ break;
+ }
+ nb_link++;
+ id_link++;
+ nb_link = min ( nb_max_link -1, nb_link );
+ SetFloat((sortie[0]),id_link-1);
+ SetSymbol((sortie[1]),link[nb_link-1]->Id);
+ SetFloat((sortie[2]),GetInt(argv[1]));
+ SetFloat((sortie[3]),GetInt(argv[2]));
+ SetFloat((sortie[4]),link[nb_link-1]->K1);
+ SetFloat((sortie[5]),link[nb_link-1]->D1);
+ SetFloat((sortie[6]),link[nb_link-1]->D2);
+ ToOutAnything(1,S_Link,7,sortie);
+ }
+ else
+ error("link : Cannot create link: Not all masses for this link have been created yet.");
}
void m_ilink(int argc,t_atom *argv)
@@ -660,7 +674,7 @@ protected:
{
t_int i,j;
t_symbol *auxarg,*auxarg2, *auxtype;
- t_atom sortie[6];
+ t_atom sortie[7];
auxtype = GetSymbol(argv[0]);
auxarg = GetASymbol(argv[1]); //auxarg : & symbol, 0 else
@@ -669,37 +683,41 @@ protected:
if (auxtype == S_massesPos)// get all masses positions
for (i=0; i<nb_mass; i++)
{
- SetFloat(sortie[0],mass[i]->posX);
- SetFloat(sortie[1],mass[i]->posY);
- SetFloat(sortie[2],mass[i]->posZ);
- ToOutAnything(0,S_massesPos,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->posX);
+ SetFloat(sortie[2],mass[i]->posY);
+ SetFloat(sortie[3],mass[i]->posZ);
+ ToOutAnything(0,S_massesPos,4,sortie);
}
else if (auxtype == S_massesForces)// get all masses forces
for (i=0; i<nb_mass; i++)
{
- SetFloat(sortie[0],mass[i]->out_forceX);
- SetFloat(sortie[1],mass[i]->out_forceY);
- SetFloat(sortie[2],mass[i]->out_forceZ);
- ToOutAnything(0,S_massesForces,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->out_forceX);
+ SetFloat(sortie[2],mass[i]->out_forceY);
+ SetFloat(sortie[3],mass[i]->out_forceZ);
+ ToOutAnything(0,S_massesForces,4,sortie);
}
else if (auxtype == S_linksPos)// get all links positions
for (i=0; i<nb_link; i++)
{
- SetFloat(sortie[0],link[i]->mass1->posX);
- SetFloat(sortie[1],link[i]->mass1->posY);
- SetFloat(sortie[2],link[i]->mass1->posZ);
- SetFloat(sortie[3],link[i]->mass2->posX);
- SetFloat(sortie[4],link[i]->mass2->posY);
- SetFloat(sortie[5],link[i]->mass2->posZ);
- ToOutAnything(0,S_linksPos,6,sortie);
+ SetFloat(sortie[0],link[i]->nbr);
+ SetFloat(sortie[1],link[i]->mass1->posX);
+ SetFloat(sortie[2],link[i]->mass1->posY);
+ SetFloat(sortie[3],link[i]->mass1->posZ);
+ SetFloat(sortie[4],link[i]->mass2->posX);
+ SetFloat(sortie[5],link[i]->mass2->posY);
+ SetFloat(sortie[6],link[i]->mass2->posZ);
+ ToOutAnything(0,S_linksPos,7,sortie);
}
else // get all masses speeds
for (i=0; i<nb_mass; i++)
{
- SetFloat(sortie[0],mass[i]->speedX);
- SetFloat(sortie[1],mass[i]->speedY);
- SetFloat(sortie[2],mass[i]->speedZ);
- ToOutAnything(0,S_massesSpeeds,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->speedX);
+ SetFloat(sortie[2],mass[i]->speedY);
+ SetFloat(sortie[3],mass[i]->speedZ);
+ ToOutAnything(0,S_massesSpeeds,4,sortie);
}
}
else if (auxtype == S_massesPos) // get mass positions
@@ -710,10 +728,11 @@ protected:
for (i=0;i<nb_mass;i++)
if (mass[i]->nbr==GetInt(argv[j]))
{
- SetFloat(sortie[0],mass[i]->posX);
- SetFloat(sortie[1],mass[i]->posY);
- SetFloat(sortie[2],mass[i]->posZ);
- ToOutAnything(0,S_massesPosNo,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->posX);
+ SetFloat(sortie[2],mass[i]->posY);
+ SetFloat(sortie[3],mass[i]->posZ);
+ ToOutAnything(0,S_massesPosNo,4,sortie);
}
}
else //symbol
@@ -725,10 +744,11 @@ protected:
{
if (auxarg2==mass[i]->Id)
{
- SetFloat(sortie[0],mass[i]->posX);
- SetFloat(sortie[1],mass[i]->posY);
- SetFloat(sortie[2],mass[i]->posZ);
- ToOutAnything(0,S_massesPosId,3,sortie);
+ SetSymbol(sortie[0],mass[i]->Id);
+ SetFloat(sortie[1],mass[i]->posX);
+ SetFloat(sortie[2],mass[i]->posY);
+ SetFloat(sortie[3],mass[i]->posZ);
+ ToOutAnything(0,S_massesPosId,4,sortie);
}
}
}
@@ -742,10 +762,11 @@ protected:
for (i=0;i<nb_mass;i++)
if (mass[i]->nbr==GetInt(argv[j]))
{
- SetFloat(sortie[0],mass[i]->out_forceX);
- SetFloat(sortie[1],mass[i]->out_forceY);
- SetFloat(sortie[2],mass[i]->out_forceZ);
- ToOutAnything(0,S_massesForcesNo,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->out_forceX);
+ SetFloat(sortie[2],mass[i]->out_forceY);
+ SetFloat(sortie[3],mass[i]->out_forceZ);
+ ToOutAnything(0,S_massesForcesNo,4,sortie);
}
}
else //symbol
@@ -757,10 +778,11 @@ protected:
{
if (auxarg2==mass[i]->Id)
{
- SetFloat(sortie[0],mass[i]->out_forceX);
- SetFloat(sortie[1],mass[i]->out_forceY);
- SetFloat(sortie[2],mass[i]->out_forceZ);
- ToOutAnything(0,S_massesForcesId,3,sortie);
+ SetSymbol(sortie[0],mass[i]->Id);
+ SetFloat(sortie[1],mass[i]->out_forceX);
+ SetFloat(sortie[2],mass[i]->out_forceY);
+ SetFloat(sortie[3],mass[i]->out_forceZ);
+ ToOutAnything(0,S_massesForcesId,4,sortie);
}
}
}
@@ -774,13 +796,14 @@ protected:
for (i=0;i<nb_link;i++)
if (link[i]->nbr==GetInt(argv[j]))
{
- SetFloat(sortie[0],link[i]->mass1->posX);
- SetFloat(sortie[1],link[i]->mass1->posY);
- SetFloat(sortie[2],link[i]->mass1->posZ);
- SetFloat(sortie[3],link[i]->mass2->posX);
- SetFloat(sortie[4],link[i]->mass2->posY);
- SetFloat(sortie[5],link[i]->mass2->posZ);
- ToOutAnything(0,S_linksPosNo,6,sortie);
+ SetFloat(sortie[0],link[i]->nbr);
+ SetFloat(sortie[1],link[i]->mass1->posX);
+ SetFloat(sortie[2],link[i]->mass1->posY);
+ SetFloat(sortie[3],link[i]->mass1->posZ);
+ SetFloat(sortie[4],link[i]->mass2->posX);
+ SetFloat(sortie[5],link[i]->mass2->posY);
+ SetFloat(sortie[6],link[i]->mass2->posZ);
+ ToOutAnything(0,S_linksPosNo,7,sortie);
}
}
else //symbol
@@ -792,13 +815,14 @@ protected:
{
if (auxarg2==link[i]->Id)
{
- SetFloat(sortie[0],link[i]->mass1->posX);
- SetFloat(sortie[1],link[i]->mass1->posY);
- SetFloat(sortie[2],link[i]->mass1->posZ);
- SetFloat(sortie[3],link[i]->mass2->posX);
- SetFloat(sortie[4],link[i]->mass2->posY);
- SetFloat(sortie[5],link[i]->mass2->posZ);
- ToOutAnything(0,S_linksPosId,6,sortie);
+ SetSymbol(sortie[0],link[i]->Id);
+ SetFloat(sortie[1],link[i]->mass1->posX);
+ SetFloat(sortie[2],link[i]->mass1->posY);
+ SetFloat(sortie[3],link[i]->mass1->posZ);
+ SetFloat(sortie[4],link[i]->mass2->posX);
+ SetFloat(sortie[5],link[i]->mass2->posY);
+ SetFloat(sortie[6],link[i]->mass2->posZ);
+ ToOutAnything(0,S_linksPosId,7,sortie);
}
}
}
@@ -812,10 +836,11 @@ protected:
for (i=0;i<nb_mass;i++)
if (mass[i]->nbr==GetInt(argv[j]))
{
- SetFloat(sortie[0],mass[i]->speedX);
- SetFloat(sortie[1],mass[i]->speedY);
- SetFloat(sortie[2],mass[i]->speedZ);
- ToOutAnything(0,S_massesSpeedsNo,3,sortie);
+ SetFloat(sortie[0],mass[i]->nbr);
+ SetFloat(sortie[1],mass[i]->speedX);
+ SetFloat(sortie[2],mass[i]->speedY);
+ SetFloat(sortie[3],mass[i]->speedZ);
+ ToOutAnything(0,S_massesSpeedsNo,4,sortie);
}
}
else //symbol
@@ -827,10 +852,11 @@ protected:
{
if (auxarg2==mass[i]->Id)
{
- SetFloat(sortie[0],mass[i]->speedX);
- SetFloat(sortie[1],mass[i]->speedY);
- SetFloat(sortie[2],mass[i]->speedZ);
- ToOutAnything(0,S_massesSpeedsId,3,sortie);
+ SetSymbol(sortie[0],mass[i]->Id);
+ SetFloat(sortie[1],mass[i]->speedX);
+ SetFloat(sortie[2],mass[i]->speedY);
+ SetFloat(sortie[3],mass[i]->speedZ);
+ ToOutAnything(0,S_massesSpeedsId,4,sortie);
}
}
}
diff --git a/msd3D/partiel.pd b/msd3D/partiel.pd
index 99a6c7c..1ae82de 100644
--- a/msd3D/partiel.pd
+++ b/msd3D/partiel.pd
@@ -9,17 +9,17 @@
#X msg 174 167 \$1 50;
#X msg 131 60 \$2;
#X obj 131 83 / 10;
-#X obj 172 84 * -10;
-#X obj 182 112 + 110;
+#X obj 182 112 + 10;
+#X obj 172 84 * 5;
#X connect 0 0 8 0;
#X connect 0 0 5 0;
#X connect 2 0 3 1;
#X connect 3 0 1 0;
#X connect 4 0 3 0;
-#X connect 5 0 10 0;
+#X connect 5 0 11 0;
#X connect 6 0 4 0;
#X connect 7 0 2 0;
#X connect 8 0 9 0;
#X connect 9 0 7 0;
-#X connect 10 0 11 0;
-#X connect 11 0 6 0;
+#X connect 10 0 6 0;
+#X connect 11 0 10 0;