From 5a6bee4fe076e06514c6e4e538590dd3a2a5cdc3 Mon Sep 17 00:00:00 2001 From: "N.N." Date: Fri, 6 Nov 2009 18:37:00 +0000 Subject: upgrade gridflow svn path=/trunk/; revision=12728 --- externals/gridflow/examples/ripple.pd | 184 ++++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 externals/gridflow/examples/ripple.pd (limited to 'externals/gridflow/examples/ripple.pd') diff --git a/externals/gridflow/examples/ripple.pd b/externals/gridflow/examples/ripple.pd new file mode 100644 index 00000000..3756a874 --- /dev/null +++ b/externals/gridflow/examples/ripple.pd @@ -0,0 +1,184 @@ +#N canvas 276 26 683 618 10; +#X obj 78 419 #out window; +#X obj 78 105 +; +#X obj 47 326 # +; +#X obj 47 370 shunt 2; +#X obj 283 189 # sin* 256; +#N canvas 609 247 325 236 distance 0; +#X text 16 15 bang; +#X text 15 149 distances to middle; +#X obj 18 36 inlet; +#X obj 18 93 #fold +; +#X text 89 95 pythagoras' theorem; +#X obj 18 131 outlet; +#X obj 18 55 #for (-128 -128) (128 128) (1 1); +#X obj 18 112 # sqrt; +#X obj 18 74 # sq-; +#X connect 2 0 6 0; +#X connect 3 0 7 0; +#X connect 6 0 8 0; +#X connect 7 0 5 0; +#X connect 8 0 3 0; +#X restore 164 41 pd distance map; +#X obj 78 440 fps detailed; +#X obj 283 130 loadbang; +#X obj 47 42 t a a; +#X obj 168 278 tgl 15 0 empty empty empty 0 -6 0 8 -241291 -1 -1 0 +1; +#X msg 78 86 1; +#X obj 47 105 # -; +#X obj 47 62 #store; +#N canvas 604 543 420 225 apply 0; +#X obj 60 48 #fold +; +#X obj 12 190 outlet 0; +#X obj 60 16 inlet; +#X obj 12 124 # +; +#X obj 12 167 # max 0; +#X obj 12 146 # min 255; +#X obj 12 16 inlet; +#X obj 58 101 #outer *>>8; +#X obj 130 69 inlet; +#X obj 60 73 # << 2; +#X connect 0 0 9 0; +#X connect 2 0 0 0; +#X connect 3 0 5 0; +#X connect 4 0 1 0; +#X connect 5 0 4 0; +#X connect 6 0 3 0; +#X connect 7 0 3 1; +#X connect 8 0 7 1; +#X connect 9 0 7 0; +#X restore 78 400 pd apply shading; +#X obj 47 -27 tgl 15 0 empty empty empty 0 -6 0 8 -24198 -1 -1 1 1 +; +#X obj 47 348 #store; +#X obj 47 25 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 164 130 # + 10; +#X text 187 278 shading on/off; +#X obj 47 240 shunt 2; +#X floatatom 106 108 5 0 0 0 - - -; +#X obj 47 195 # *>>8; +#X obj 164 310 loadbang; +#X obj 164 21 loadbang; +#X obj 78 462 print; +#X obj 164 149 # inv* 10000; +#N canvas 392 110 431 233 angle 0; +#X obj 21 133 #outer atan; +#X text 81 154 angles to centre; +#X text 22 13 bang; +#X obj 21 32 inlet; +#X obj 21 56 #for -128 128 1; +#X obj 21 153 outlet 0; +#X obj 21 90 #t; +#X connect 0 0 5 0; +#X connect 3 0 4 0; +#X connect 4 0 6 0; +#X connect 6 0 0 0; +#X connect 6 1 0 1; +#X restore 283 151 pd angle map; +#X obj 47 151 # *>>8; +#X obj 46 218 # *>>8; +#X obj 259 235 hsl 128 15 -256 256 0 1 empty empty empty -2 -6 0 8 +-260818 -1 -1 12600 1; +#X obj 259 252 hsl 128 15 -256 256 0 1 empty empty empty -2 -6 0 8 +-260818 -1 -1 3200 1; +#N canvas 637 537 387 220 compute 1; +#X obj 8 113 #store; +#X obj 55 113 # sin* 64; +#X obj 55 71 #for 0 1024 1; +#X obj 55 50 loadbang; +#X obj 55 92 # * 900; +#X obj 125 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 +-1; +#X obj 8 135 outlet; +#X text 75 151 This is somewhat like [# sin]; +#X text 75 166 but much faster (lookup table); +#X obj 8 11 inlet; +#X obj 8 30 #outer ignore (0); +#X connect 0 0 6 0; +#X connect 1 0 0 1; +#X connect 2 0 4 0; +#X connect 3 0 2 0; +#X connect 4 0 1 0; +#X connect 5 0 2 0; +#X connect 9 0 10 0; +#X connect 10 0 0 0; +#X restore 47 128 pd compute sine; +#X text 232 358 background image; +#X obj 165 375 #in teapot.png; +#X obj 165 356 loadbang; +#X text 215 219 intensity of wave; +#X obj 47 4 metro 33.3667; +#X text 246 5 waves.pd is more interesting; +#X text 225 -9 this is a quite boring wave generator; +#X text 95 61 table for distance map; +#X floatatom 216 237 5 0 0 0 - - -; +#X floatatom 216 253 5 0 0 0 - - -; +#X obj 157 239 #pack 2; +#X obj -13 -85 cnv 15 680 30 empty empty empty 20 12 0 14 -233017 -66577 +0; +#X text 0 -72 Copyright 2002 Mathieu Bouchard; +#X text 0 -85 ripple.pd; +#X obj -15 501 cnv 15 680 30 empty empty empty 20 12 0 14 -200249 -66577 +0; +#X text -7 508 GridFlow 0.8.0; +#X text -7 508 GridFlow 0.8.0; +#X obj 326 429 #color; +#X text 411 410 color of ripple shading; +#X obj 164 329 #for (0 0) (256 256) (1 1); +#X obj 283 170 #outer + (0 9000); +#X obj 47 173 #outer ignore (0 0); +#X obj 40 274 #t; +#X obj 326 391 loadbang; +#X msg 326 410 255 255 100; +#X connect 0 0 6 0; +#X connect 1 0 20 0; +#X connect 1 0 11 1; +#X connect 2 0 15 0; +#X connect 3 0 13 0; +#X connect 3 1 0 0; +#X connect 4 0 21 1; +#X connect 5 0 17 0; +#X connect 5 0 12 1; +#X connect 6 0 24 0; +#X connect 7 0 26 0; +#X connect 8 0 12 0; +#X connect 8 1 10 0; +#X connect 9 0 19 1; +#X connect 9 0 3 1; +#X connect 10 0 1 0; +#X connect 11 0 31 0; +#X connect 12 0 11 0; +#X connect 13 0 0 0; +#X connect 14 0 36 0; +#X connect 15 0 3 0; +#X connect 16 0 8 0; +#X connect 17 0 25 0; +#X connect 19 0 54 0; +#X connect 19 1 2 0; +#X connect 20 0 1 1; +#X connect 21 0 28 0; +#X connect 22 0 51 0; +#X connect 23 0 5 0; +#X connect 25 0 27 1; +#X connect 26 0 52 0; +#X connect 27 0 53 0; +#X connect 28 0 19 0; +#X connect 29 0 40 0; +#X connect 30 0 41 0; +#X connect 31 0 27 0; +#X connect 33 0 15 1; +#X connect 34 0 33 0; +#X connect 36 0 16 0; +#X connect 40 0 42 0; +#X connect 41 0 42 1; +#X connect 42 0 28 1; +#X connect 49 0 13 2; +#X connect 51 0 2 1; +#X connect 52 0 4 0; +#X connect 53 0 21 0; +#X connect 54 0 2 0; +#X connect 54 1 13 1; +#X connect 55 0 56 0; +#X connect 56 0 49 0; -- cgit v1.2.1