diff options
author | N.N. <nimon@users.sourceforge.net> | 2010-09-09 09:14:34 +0000 |
---|---|---|
committer | N.N. <nimon@users.sourceforge.net> | 2010-09-09 09:14:34 +0000 |
commit | 40f44ede6fb1b3b160fc34bac7e46a0f86653f64 (patch) | |
tree | 251b4a6d46f94b6870f7cbf7f2437a057fcd2b07 /msd/msd2D/06_msd2Dgravit.pd | |
parent | a37353ab3ae1ecd468280a9aad2555177714dbcb (diff) |
svn path=/trunk/externals/nusmuk/; revision=14014
Diffstat (limited to 'msd/msd2D/06_msd2Dgravit.pd')
-rw-r--r-- | msd/msd2D/06_msd2Dgravit.pd | 212 |
1 files changed, 212 insertions, 0 deletions
diff --git a/msd/msd2D/06_msd2Dgravit.pd b/msd/msd2D/06_msd2Dgravit.pd new file mode 100644 index 0000000..0213fe5 --- /dev/null +++ b/msd/msd2D/06_msd2Dgravit.pd @@ -0,0 +1,212 @@ +#N canvas 386 22 491 156 10; +#X obj 18 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X text 39 18 reset; +#N canvas 0 22 450 300 gem_stuff 0; +#X msg 30 89 0 \, destroy; +#X obj 30 185 gemhead; +#X obj 30 238 world_light; +#X obj 30 148 gemwin; +#X msg 30 66 reset \, dimen 800 800 \, create \, lighting 1 \, 1; +#X obj 30 212 rotateXYZ 30 20 0; +#X obj 32 10 inlet; +#X obj 32 37 sel 1 0; +#X connect 0 0 3 0; +#X connect 1 0 5 0; +#X connect 4 0 3 0; +#X connect 5 0 2 0; +#X connect 6 0 7 0; +#X connect 7 0 4 0; +#X connect 7 1 0 0; +#X restore 18 87 pd gem_stuff; +#X obj 18 69 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1 +; +#N canvas 0 22 804 395 creation 0; +#X obj 42 28 bng 20 250 50 0 empty empty empty 0 -6 0 8 -258699 -1 +-1; +#X msg 239 84 reset; +#X obj 245 32 loadbang; +#X text 68 30 reset; +#X obj 167 55 t b b b b b; +#X text 501 28 change number of mass to test performance; +#X text 501 41 (and reset afterwards); +#X obj 441 34 nbx 5 14 1 20000 1 1 empty empty empty 0 -6 0 10 -262144 +-1 -1 1681.79 256; +#X msg 185 241 Xmax 4 \, Xmin -4 \, Ymax 4 \, Ymin -4; +#X msg 167 215 setL sun 0; +#X msg 221 107 mass fix 0 100 0 0; +#X text 409 270 0.2 : rigidity \, 0 : damping \, -2 : power \, 0.4 +: Lmin; +#X text 363 109 Sun; +#X text 288 181 Initial speed; +#N canvas 309 104 769 663 masses 0; +#X obj 151 16 inlet; +#X obj 232 28 inlet; +#X obj 151 616 outlet; +#X msg 151 551 mass mob 1 \$1 \$2 \$3; +#X msg 151 307 seed 3; +#X obj 151 519 pack f f f; +#X obj 151 228 t b b b; +#X msg 243 306 seed 20; +#X msg 331 308 seed 10; +#X obj 151 327 random 10000; +#X obj 243 371 - 1; +#X obj 331 370 - 1; +#X obj 151 47 t b; +#X obj 333 52 loadbang; +#X text 263 277 X; +#X text 166 276 M; +#X text 372 278 Y; +#X obj 151 67 until; +#X obj 151 86 f; +#X obj 177 87 + 1; +#X obj 177 118 mod 1000; +#X obj 206 87 sel 0; +#X obj 243 327 random 1000; +#X obj 331 328 random 1000; +#X obj 243 348 / 50000; +#X obj 331 349 / 50000; +#X obj 151 349 / 250; +#X obj 151 371 + 185; +#X connect 0 0 12 0; +#X connect 1 0 20 1; +#X connect 3 0 2 0; +#X connect 4 0 9 0; +#X connect 5 0 3 0; +#X connect 6 0 9 0; +#X connect 6 1 22 0; +#X connect 6 2 23 0; +#X connect 7 0 22 0; +#X connect 8 0 23 0; +#X connect 9 0 26 0; +#X connect 10 0 5 1; +#X connect 11 0 5 2; +#X connect 12 0 17 0; +#X connect 13 0 7 0; +#X connect 13 0 8 0; +#X connect 13 0 4 0; +#X connect 17 0 18 0; +#X connect 18 0 19 0; +#X connect 18 0 6 0; +#X connect 19 0 20 0; +#X connect 20 0 21 0; +#X connect 20 0 18 1; +#X connect 21 0 17 1; +#X connect 22 0 24 0; +#X connect 23 0 25 0; +#X connect 24 0 10 0; +#X connect 25 0 11 0; +#X connect 26 0 27 0; +#X connect 27 0 5 0; +#X restore 203 144 pd masses; +#X text 410 289 The power of the link is -2 to simulate a gravity field +in 1/R^2; +#X text 292 146 Particules; +#X msg 185 268 link sun fix mob 0.2 0 -2 0.4; +#X msg 167 178 forceX mob 5.9; +#X obj 167 310 s \$0-msdin; +#X obj 166 25 inlet; +#X connect 0 0 4 0; +#X connect 1 0 19 0; +#X connect 2 0 4 0; +#X connect 4 0 9 0; +#X connect 4 0 18 0; +#X connect 4 1 8 0; +#X connect 4 1 17 0; +#X connect 4 2 14 0; +#X connect 4 3 10 0; +#X connect 4 4 1 0; +#X connect 7 0 14 1; +#X connect 8 0 19 0; +#X connect 9 0 19 0; +#X connect 10 0 19 0; +#X connect 14 0 19 0; +#X connect 17 0 19 0; +#X connect 18 0 19 0; +#X connect 20 0 4 0; +#X restore 18 43 pd creation; +#X text 116 58 gravity field simulation; +#X text 115 72 if you have cpu problem \, you can reduce the mass number +in "creation"; +#N canvas 0 22 450 300 compute 0; +#X obj 52 182 msd2D --------------------------------; +#X obj 52 64 t b; +#X obj 52 41 gemhead; +#X msg 197 123 forceX mob 0.051; +#X msg 197 149 forceY mob 0.1; +#X msg 52 98 bang \, bang \, get massesPos; +#N canvas 637 205 609 594 massrender 0; +#X obj 124 5 inlet; +#X obj 291 245 translateXYZ; +#X obj 291 186 gemhead; +#X obj 291 219 separator; +#X obj 292 63 unpack f f f; +#X obj 57 257 translateXYZ; +#X obj 57 198 gemhead; +#X obj 57 231 separator; +#X obj 123 31 route 0 1; +#X obj 296 118 t b; +#X obj 64 71 unpack f f; +#X obj 57 151 t b f; +#X obj 168 262 translateXYZ; +#X obj 168 197 gemhead; +#X obj 168 236 separator; +#X obj 175 76 unpack f f; +#X obj 168 154 t b f; +#X obj 169 290 color 1 0 0; +#X obj 292 319 square 0.015; +#X obj 168 320 square 0.04; +#X text 61 351 Sun; +#X text 169 355 Red particule; +#X text 307 355 Particule; +#X obj 56 315 sphere 0.3 30; +#X obj 57 289 color 0.3 0.3 0.3; +#X obj 292 291 color 0.3 0.3 0.3; +#X obj 9 49 loadbang; +#X msg 9 80 0; +#X connect 0 0 8 0; +#X connect 1 0 25 0; +#X connect 2 0 3 0; +#X connect 3 0 1 0; +#X connect 4 0 9 0; +#X connect 4 1 1 1; +#X connect 4 2 1 2; +#X connect 5 0 24 0; +#X connect 6 0 7 0; +#X connect 7 0 5 0; +#X connect 8 0 10 0; +#X connect 8 1 15 0; +#X connect 8 2 4 0; +#X connect 9 0 2 0; +#X connect 10 0 11 0; +#X connect 10 1 5 2; +#X connect 11 0 6 0; +#X connect 11 1 5 1; +#X connect 12 0 17 0; +#X connect 13 0 14 0; +#X connect 14 0 12 0; +#X connect 15 0 16 0; +#X connect 15 1 12 2; +#X connect 16 0 13 0; +#X connect 16 1 12 1; +#X connect 17 0 19 0; +#X connect 24 0 23 0; +#X connect 25 0 18 0; +#X connect 26 0 27 0; +#X connect 27 0 2 0; +#X connect 27 0 13 0; +#X connect 27 0 6 0; +#X restore 52 239 pd massrender; +#X obj 52 212 route massesPos; +#X obj 63 147 r \$0-msdin; +#X connect 0 0 7 0; +#X connect 1 0 5 0; +#X connect 2 0 1 0; +#X connect 3 0 0 0; +#X connect 4 0 0 0; +#X connect 5 0 0 0; +#X connect 7 0 6 0; +#X connect 8 0 0 0; +#X restore 18 107 pd compute; +#X connect 0 0 4 0; +#X connect 3 0 2 0; |