diff options
Diffstat (limited to 'boids2d-help.pd')
-rw-r--r-- | boids2d-help.pd | 732 |
1 files changed, 732 insertions, 0 deletions
diff --git a/boids2d-help.pd b/boids2d-help.pd new file mode 100644 index 0000000..e48c76b --- /dev/null +++ b/boids2d-help.pd @@ -0,0 +1,732 @@ +#N canvas 0 31 975 643 10; +#X msg -99 601 dump; +#X msg 266 113 neighbors \$1; +#X floatatom 266 98 5 0 4 0 - neighbors -; +#X floatatom 266 133 5 0 0 0 - maxspeed -; +#X msg 266 148 maxspeed \$1; +#X floatatom 266 168 5 0 0 0 - minspeed -; +#X msg 266 183 minspeed \$1; +#X floatatom 266 203 5 0 0 0 - center -; +#X msg 266 218 center \$1; +#X floatatom 266 238 5 0 0 0 - attract -; +#X msg 266 253 attract \$1; +#X floatatom 266 273 5 0 0 0 - match -; +#X msg 266 288 match \$1; +#X floatatom 266 308 5 0 0 0 - avoid -; +#X msg 266 323 avoid \$1; +#X obj -125 411 r boidParam; +#X floatatom 266 343 5 0 0 0 - repel -; +#X msg 266 358 repel \$1; +#X floatatom 266 378 5 0 0 0 - edgedist -; +#X msg 266 393 edgedist \$1; +#X floatatom 266 413 5 0 0 0 - speed -; +#X msg 266 428 speed \$1; +#X floatatom 266 448 5 0 0 0 - inertia -; +#X msg 266 463 inertia \$1; +#X floatatom 266 483 5 0 0 0 - accel -; +#X msg 266 498 accel \$1; +#X floatatom 266 518 5 0 0 0 - prefdist -; +#X msg 266 533 prefdist \$1; +#X msg -99 620 reset; +#X text 357 148 maximum speed of speed range; +#X text 359 182 minimum speed of speed range; +#X text 356 217 strength of centering instinct; +#X text 358 428 overall speed; +#X text 359 499 speed of acceleration; +#X text 359 530 preferred distance from neighbors; +#X floatatom 267 556 5 0 0 0 - flyrect[0] -; +#X floatatom 306 556 5 0 0 0 - flyrect[1] -; +#X floatatom 345 556 5 0 0 0 - flyrect[2] -; +#X floatatom 384 556 5 0 0 0 - - -; +#X floatatom 266 615 5 0 0 0 - - -; +#X floatatom 306 615 5 0 0 0 - - -; +#X floatatom 266 63 5 0 0 0 - - -; +#X msg 266 78 number \$1; +#X text 357 76 number of boids; +#X floatatom -99 567 5 0 0 0 - - -; +#X msg -99 582 mode \$1; +#X text -35 582 output mode; +#X obj 266 676 s boidParam; +#X obj -99 641 s boidParam; +#X text -35 601 parameter dump; +#X text -36 621 reset boids randomly inside flyrect; +#X text 357 111 number of neighbors each boid consults when flocking +; +#X text 356 288 strength of neighbor speed matching instinct; +#X text 356 323 strength of neighbor avoidance instinct; +#X text 356 355 strength of wall avoidance instinct; +#X text 358 391 distance of vision for avoiding wall edges; +#X text 359 462 willingness to change speed and direction; +#X text 355 251 strength of attraction to 'attractpt'; +#X text -191 84 (c) 1995-98 Eric L. Singer (eric@ericsinger.com); +#X text -191 126 Based on Simon Fraser's implementation of Craig Reynolds' +Boids algorithm. Boids is free for non-commercial use; +#X text -191 159 Boids is a bird flight and animal flock simulator. +It is based on the same algorithm which was used in Jurassic Park for +the herding dinosaurs.; +#X text -191 208 Boids takes an integer argument which is the number +of boids. Each time Boids receives a bang \, it calculates and outputs +the new positions of the boids. The output consists of thew coordiantes +for each boid \, the number and type depending on the mode.; +#X text -190 282 The flight parameters can be changed with messages. +Use the 'dump' message to output a list of the current parameter settings. +; +#X text -190 328 For more information about the Boids algorithm \, +see Craig Reynolds' Web site at "http://reality.sgi.com/employees/craig/boids.html". +; +#X text -188 64 arguments: <float> number of boids \, <float> output +mode; +#X obj -72 460 print dump; +#X obj -203 9 cnv 15 800 48 empty empty boids2d 20 12 2 24 -228915 +-66577 0; +#X obj -151 410 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 +-1 -1; +#N canvas 430 22 471 383 gem_example 0; +#X msg 33 31 destroy; +#N canvas 494 140 629 324 gemwin 0; +#X obj 219 190 gemwin; +#X obj 66 194 outlet; +#X obj 67 10 inlet; +#X obj 67 41 route create; +#X msg 67 70 set destroy; +#X msg 157 70 set create; +#X msg 350 115 destroy \, reset; +#X msg 238 71 color 0 0 0.5; +#X msg 212 146 create \, 1 \, frame 30 \, color 1 1 1; +#X connect 2 0 3 0; +#X connect 3 0 4 0; +#X connect 3 0 8 0; +#X connect 3 1 5 0; +#X connect 3 1 6 0; +#X connect 4 0 1 0; +#X connect 5 0 1 0; +#X connect 6 0 0 0; +#X connect 7 0 0 0; +#X connect 8 0 0 0; +#X restore 33 51 pd gemwin; +#X obj 33 91 tgl 15 0 empty empty start_flocking_animation 20 6 1 10 +-262144 -1 -1 0 1; +#X obj 204 135 r boidParam; +#X obj 33 112 metro 33; +#X floatatom 33 244 5 0 0 0 - - -; +#X floatatom 84 244 5 0 0 0 - - -; +#X obj 86 318 s boidParam; +#N canvas 0 22 466 316 orbit 0; +#X obj 103 82 counter 360; +#X floatatom 103 107 5 0 0 0 - - -; +#X obj 102 204 poltocar; +#X obj 134 169 expr $f1 * (3.141593/180.); +#X obj 103 134 t b f; +#X obj 103 45 inlet; +#X obj 152 254 outlet; +#X obj 96 254 outlet; +#X obj 102 170 1.5; +#X connect 0 0 1 0; +#X connect 1 0 4 0; +#X connect 2 0 6 0; +#X connect 2 1 7 0; +#X connect 3 0 2 1; +#X connect 4 0 8 0; +#X connect 4 1 3 0; +#X connect 5 0 0 0; +#X connect 8 0 2 0; +#X restore 33 222 pd orbit; +#X text 96 30 create/destroy OpenGl context; +#X obj 33 181 spigot; +#X obj 69 160 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 +; +#X obj 339 113 s init; +#X obj 358 84 loadbang; +#X obj 340 85 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#N canvas 0 22 418 379 center 0; +#X obj 101 37 gemhead; +#X obj 99 201 translateXYZ; +#X obj 124 166 unpack 0 0 0; +#X obj 147 94 inlet; +#X msg 240 193 draw line; +#X obj 252 106 loadbang; +#X obj 100 131 alpha; +#X obj 101 68 color 1 0.5 0 0.5; +#X obj 99 228 circle 0.1; +#X connect 0 0 7 0; +#X connect 1 0 8 0; +#X connect 2 0 1 1; +#X connect 2 1 1 2; +#X connect 2 2 1 3; +#X connect 3 0 2 0; +#X connect 4 0 8 0; +#X connect 5 0 4 0; +#X connect 6 0 1 0; +#X connect 7 0 6 0; +#X restore 32 342 pd center; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 205 224 pd boid; +#X msg 85 295 attractpt \$1 \$2; +#X obj 33 267 pack 0 0; +#X obj 205 163 boids2d 10; +#X obj 206 191 route 0 1 2 3 4 5 6 7 8 9; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 215 234 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 225 244 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 235 254 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 245 264 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 255 274 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 265 284 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 275 294 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 285 304 pd boid; +#N canvas 213 30 518 368 boid 0; +#X obj 100 24 gemhead; +#X obj 99 201 translateXYZ; +#X obj 192 1 inlet; +#X obj 100 155 alpha; +#X obj 101 85 color 1 0.5 0 0.5; +#N canvas 0 22 474 324 rand_color 0; +#X obj 47 130 random 1000; +#X obj 48 171 * 0.001; +#X obj 131 130 random 1000; +#X obj 132 171 * 0.001; +#X obj 214 131 random 1000; +#X obj 215 172 * 0.001; +#X obj 46 83 t b b b; +#X obj 48 256 outlet; +#X obj 47 26 r init; +#X obj 49 217 pack 0 0 0 0.5; +#X connect 0 0 1 0; +#X connect 1 0 9 0; +#X connect 2 0 3 0; +#X connect 3 0 9 1; +#X connect 4 0 5 0; +#X connect 5 0 9 2; +#X connect 6 0 0 0; +#X connect 6 1 2 0; +#X connect 6 2 4 0; +#X connect 8 0 6 0; +#X connect 9 0 7 0; +#X restore 214 58 pd rand_color; +#X obj 231 85 t 1; +#X obj 99 228 circle 0.05; +#X obj 192 162 unpack 0 0; +#X connect 0 0 4 0; +#X connect 1 0 7 0; +#X connect 2 0 8 0; +#X connect 3 0 1 0; +#X connect 4 0 3 0; +#X connect 5 0 4 1; +#X connect 5 0 6 0; +#X connect 6 0 3 1; +#X connect 8 0 1 1; +#X connect 8 1 1 2; +#X restore 295 314 pd boid; +#X connect 0 0 1 0; +#X connect 1 0 0 0; +#X connect 2 0 4 0; +#X connect 3 0 19 0; +#X connect 4 0 10 0; +#X connect 4 0 19 0; +#X connect 5 0 18 0; +#X connect 6 0 18 1; +#X connect 8 0 5 0; +#X connect 8 1 6 0; +#X connect 10 0 8 0; +#X connect 11 0 10 1; +#X connect 13 0 12 0; +#X connect 13 0 11 0; +#X connect 14 0 12 0; +#X connect 17 0 7 0; +#X connect 18 0 17 0; +#X connect 18 0 15 0; +#X connect 19 0 20 0; +#X connect 20 0 16 0; +#X connect 20 1 21 0; +#X connect 20 2 22 0; +#X connect 20 3 23 0; +#X connect 20 4 24 0; +#X connect 20 5 25 0; +#X connect 20 6 26 0; +#X connect 20 7 27 0; +#X connect 20 8 28 0; +#X connect 20 9 29 0; +#X restore 57 430 pd gem_example; +#X obj 266 574 pack 0 0 0 0 0 0; +#X obj 266 632 pack 0 0 0; +#X floatatom 345 615 5 0 0 0 - - -; +#X text -190 105 float/2d/3d adaptation 08/2005 by a. sier / jasch +; +#N canvas 754 114 186 470 init 0; +#X obj 34 21 loadbang; +#X obj 94 21 r reset; +#X msg 15 78 \; neighbors 4; +#X msg 15 348 \; speed 3; +#X obj 16 49 b; +#X obj 17 21 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X msg 15 438 \; prefdist 1.5; +#X msg 15 108 \; maxspeed 1.5; +#X msg 15 138 \; minspeed 1.2; +#X msg 15 168 \; center 1.2; +#X msg 15 198 \; attract 1.25; +#X msg 15 228 \; match 0.3; +#X msg 15 288 \; repel 3.5; +#X msg 15 258 \; avoid 3.5; +#X msg 15 318 \; edgedist 3; +#X msg 15 379 \; inertia 4.5; +#X msg 15 408 \; accel 2.5; +#X connect 0 0 4 0; +#X connect 1 0 4 0; +#X connect 4 0 2 0; +#X connect 4 0 7 0; +#X connect 4 0 8 0; +#X connect 4 0 9 0; +#X connect 4 0 10 0; +#X connect 4 0 11 0; +#X connect 4 0 13 0; +#X connect 4 0 12 0; +#X connect 4 0 3 0; +#X connect 4 0 15 0; +#X connect 4 0 16 0; +#X connect 4 0 6 0; +#X connect 5 0 4 0; +#X restore 57 411 pd init; +#X obj -151 438 boids2d 16 0; +#X obj -150 488 print boids2d; +#X msg 266 592 flyrect \$1 \$2 \$3 \$4; +#X msg 266 652 attractpt \$1 \$2; +#X text 389 614 point to which boids are attracted (x/y); +#X text 392 575 bounding box (walls) in which to fly (l/t/r/b); +#N canvas 88 105 494 344 META 0; +#X text 12 165 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan +Wilkes for Pd version 0.42.; +#X text 12 145 AUTHOR Eric L. Singer; +#X text 12 5 KEYWORDS control; +#X text 12 45 DESCRIPTION bird flight and animal flock simulator; +#X text 12 65 INLET_0 bang dump mode reset number neighbors maxspeed +minspeed center attract match avoid repel edgedist speed inertia accel +prefdist flyrect attractpt; +#X text 12 105 OUTLET_0 list; +#X text 12 125 OUTLET_1 list; +#X text 12 25 LICENSE GPL v2; +#X restore 720 676 pd META; +#X connect 0 0 48 0; +#X connect 1 0 47 0; +#X connect 2 0 1 0; +#X connect 3 0 4 0; +#X connect 4 0 47 0; +#X connect 5 0 6 0; +#X connect 6 0 47 0; +#X connect 7 0 8 0; +#X connect 8 0 47 0; +#X connect 9 0 10 0; +#X connect 10 0 47 0; +#X connect 11 0 12 0; +#X connect 12 0 47 0; +#X connect 13 0 14 0; +#X connect 14 0 47 0; +#X connect 15 0 74 0; +#X connect 16 0 17 0; +#X connect 17 0 47 0; +#X connect 18 0 19 0; +#X connect 19 0 47 0; +#X connect 20 0 21 0; +#X connect 21 0 47 0; +#X connect 22 0 23 0; +#X connect 23 0 47 0; +#X connect 24 0 25 0; +#X connect 25 0 47 0; +#X connect 26 0 27 0; +#X connect 27 0 47 0; +#X connect 28 0 48 0; +#X connect 35 0 69 0; +#X connect 36 0 69 1; +#X connect 37 0 69 2; +#X connect 38 0 69 3; +#X connect 39 0 70 0; +#X connect 40 0 70 1; +#X connect 41 0 42 0; +#X connect 42 0 47 0; +#X connect 44 0 45 0; +#X connect 45 0 48 0; +#X connect 67 0 74 0; +#X connect 69 0 76 0; +#X connect 70 0 77 0; +#X connect 71 0 70 2; +#X connect 74 0 75 0; +#X connect 74 1 65 0; +#X connect 76 0 47 0; +#X connect 77 0 47 0; |