[jitter] Re: tracking pixels in a matrix and output as individual numbers or list
Samuel Van Ransbeeck
Thinksamuel at yahoo.com
Sat Mar 1 20:07:58 MST 2008
- Previous message: [jitter] tracking pixels in a matrix and output as individual numbers or list
- Next message: [jitter] Re: tracking pixels in a matrix and output as individual numbers or list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Here goes the conway patch. I want to know which pixel is alive and from every pixel alive i want it to sent a bang (if then ...) to a makenoteobject. For that I need to output the coordinates of every pixel and its state. Most important is too know which cells are alive, and this in an automated way. I have written algorhitmic music once withdoing all the calculations and so by hand. I really want to avoid doing that again max v2; #N vpatcher 100 100 700 500; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P hidden newex 272 245 104 196617 bgcolor 220 220 192; #P toggle 12 137 15 0; #N vpatcher 40 55 444 408; #P window setfont "Sans Serif" 9.; #P newex 62 295 40 196617 change; #P outlet 62 319 15 0; #P newex 62 273 29 196617 == 0; #P newex 62 231 110 196617 unpack 0 0 0 0; #P newex 62 252 110 196617 expr $i1+$i2+$i3+$i4; #P newex 34 209 53 196617 jit.3m; #P newex 34 47 27 196617 t l b; #P newex 34 188 123 196617 jit.op 1 char 40 30 @op -; #P newex 147 118 70 196617 prepend index; #N counter 0; #X flags 0 0; #P newobj 147 93 66 196617 counter 0 1; #P newex 225 118 105 196617 prepend outputmatrix; #N counter 0; #X flags 0 0; #P newobj 225 93 66 196617 counter 1 0; #P newex 147 151 138 196617 jit.matrixset 2 1 char 40 30; #P inlet 34 27 15 0; #P connect 0 0 7 0; #P connect 7 0 6 0; #P connect 6 0 8 0; #P connect 8 2 10 0; #P connect 10 0 9 0; #P connect 9 0 11 0; #P connect 11 0 13 0; #P connect 13 0 12 0; #P connect 10 1 9 1; #P connect 10 2 9 2; #P fasten 7 1 4 0 56 78 152 78; #P connect 4 0 5 0; #P fasten 7 0 1 0 39 143 152 143; #P fasten 3 0 1 0 230 143 152 143; #P connect 5 0 1 0; #P connect 1 0 6 1; #P connect 10 3 9 3; #P fasten 7 1 2 0 56 78 230 78; #P connect 2 0 3 0; #P pop; #P newobj 12 114 75 196617 p checkfordead; #P user ubumenu 289 41 103 196617 0 1 1 0; #X add R-pentomino; #X add pentadecathlon; #X add pulsar; #X prefix_set 0 0 <none> 0; #N vpatcher 30 70 430 370; #P window setfont "Sans Serif" 9.; #P newex 54 82 52 196617 t b l clear; #P newex 64 143 140 196617 sprintf setcell %i %i val 255; #P newex 64 121 45 196617 zl iter 2; #P outlet 54 200 15 0; #P inlet 54 54 15 0; #P connect 0 0 4 0; #P connect 4 0 1 0; #P connect 3 0 1 0; #P connect 4 2 1 0; #P connect 4 1 2 0; #P connect 2 0 3 0; #P pop; #P newobj 289 87 35 196617 p putit; #N coll ; #T flags 1 0; #T 0 20 15 21 15 19 16 20 16 20 17; #T 1 10 15 11 15 12 15 13 15 14 15 15 15 16 15 17 15 18 15 19 15; #T 2 20 15 19 16 20 16 21 16 19 17 21 17 19 18 20 18 21 18 20 19; #P newobj 289 63 53 196617 coll; #P window linecount 6; #P comment 263 145 123 196617 jit.conway wraps the matrix as a torus (i.e. cells in the game moving off an edge of the matrix re-appear on the opposite side of the matrix).; #P window linecount 1; #P comment 9 76 85 196617 ? clear the game.; #P comment 114 22 85 196617 ? start the game.; #P comment 85 305 193 196617 works with uniplanar matrices as well.; #P message 37 91 58 196617 clear \, bang; #N vpatcher 30 70 393 510; #P window setfont "Sans Serif" 9.; #P newex 57 100 41 196617 route 1; #P newex 57 77 42 196617 zl rot 1; #P outlet 225 369 15 0; #P inlet 57 12 15 0; #P newex 57 122 65 196617 vexpr $i1/4; #P newex 225 325 75 196617 prepend setcell; #P newex 225 304 63 196617 pack 0 0 s 0; #P message 292 276 14 196617 0; #P message 264 276 26 196617 255; #P newex 264 252 40 196617 sel 0 1; #P newex 264 230 41 196617 == 255; #P newex 225 186 51 196617 route cell; #P newex 57 55 49 196617 zl slice 3; #P newex 225 206 49 196617 zl slice 3; #P newex 57 32 63 196617 route mouse; #P newex 57 164 178 196617 jit.matrix life2 1 char 40 30 @thru 1; #P newex 57 141 75 196617 prepend getcell; #P newex 225 346 27 196617 t b l; #P connect 14 0 3 0; #P connect 3 0 5 0; #P connect 5 0 16 0; #P connect 16 0 17 0; #P connect 17 0 13 0; #P connect 13 0 1 0; #P connect 1 0 2 0; #P fasten 0 1 2 0 247 397 38 397 38 161 62 161; #P connect 2 1 6 0; #P connect 6 0 4 0; #P connect 4 0 11 0; #P connect 11 0 12 0; #P connect 12 0 0 0; #P connect 0 0 15 0; #P connect 4 1 7 0; #P connect 7 0 8 0; #P connect 8 0 9 0; #P fasten 9 0 11 3 269 297 281 297; #P fasten 10 0 11 3 297 297 281 297; #P fasten 8 1 10 0 284 272 297 272; #P pop; #P newobj 247 274 55 196617 p celldraw; #P button 69 42 15 0; #P user jit.pwindow 96 143 162 122 0 1 0 0 1 0; #P newex 97 114 115 196617 jit.matrix life2 @thru 1; #P newex 97 67 139 196617 jit.matrix life2 1 char 40 30; #P toggle 97 21 15 0; #P newex 97 42 50 196617 metro 50; #P newex 97 90 55 196617 jit.conway; #B color 5; #P window linecount 2; #P comment 108 269 130 196617 ? draw in the pwindow to add 'live' cells.; #P window linecount 1; #P comment 289 25 100 196617 ? some patterns.; #P window linecount 3; #P comment 11 154 67 196617 dead world (no change or oscillation).; #P fasten 3 0 19 0 102 110 17 110; #P connect 19 0 20 0; #P connect 5 0 4 0; #P fasten 9 0 6 0 74 62 102 62; #P connect 4 0 6 0; #P connect 6 0 3 0; #P connect 3 0 7 0; #P fasten 11 0 7 0 42 110 102 110; #P fasten 10 0 7 0 252 301 89 301 89 110 102 110; #P fasten 17 0 7 0 294 110 102 110; #P connect 7 0 8 0; #P connect 8 1 10 0; #P connect 18 0 16 0; #P connect 16 0 17 0; #P pop;
- Previous message: [jitter] tracking pixels in a matrix and output as individual numbers or list
- Next message: [jitter] Re: tracking pixels in a matrix and output as individual numbers or list
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
