Update of /cvsroot/pure-data/externals/pdp/opengl/abstractions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6756/opengl/abstractions
Added Files: 3dp_basicscene.pd 3dp_blend.pd 3dp_display_texture.pd 3dp_fixedsizewindowcontext.pd 3dp_mouserotate.pd 3dp_screenshot.pd elbat.pd randomnormal.pd randomwalk2D.pd smoothupdate.pd Log Message: checking in pdp 0.12.4 from http://zwizwa.fartit.com/pd/pdp/pdp-0.12.4.tar.gz
--- NEW FILE: 3dp_mouserotate.pd --- #N canvas 534 483 533 399 10; #X obj 27 19 inlet; #X obj 27 363 outlet; #X obj 70 152 - 0.5; #X obj 135 151 - 0.5; #X obj 82 214 *; #X obj 135 212 *; #X obj 135 186 t f f; #X obj 82 184 t f f; #X obj 82 243 +; #X obj 113 271 sqrt; #X obj 92 19 inlet; #X obj 113 298 * 360; #X obj 27 329 3dp_view rota; #X text 216 138 convert mouse coordinates to axis and angle; #X obj 70 118 unpack 0 0; #X obj 92 49 route drag1 press1; #X connect 0 0 12 0; #X connect 2 0 7 0; #X connect 2 0 12 2; #X connect 3 0 6 0; #X connect 3 0 12 1; #X connect 4 0 8 0; #X connect 5 0 8 1; #X connect 6 0 5 0; #X connect 6 1 5 1; #X connect 7 0 4 0; #X connect 7 1 4 1; #X connect 8 0 9 0; #X connect 9 0 11 0; #X connect 10 0 15 0; #X connect 11 0 12 4; #X connect 12 0 1 0; #X connect 14 0 2 0; #X connect 14 1 3 0; #X connect 15 0 14 0; #X connect 15 1 14 0;
--- NEW FILE: 3dp_display_texture.pd --- #N canvas 277 275 874 339 10; #X obj 244 246 3dp_view scale_aspect; #X obj 37 131 inlet; #X obj 222 130 inlet; #X obj 351 131 inlet; #X text 27 107 context inlet; #X text 198 106 texture inlet; #X text 328 106 scaling inlet; #X text 406 244 <- scale the square to the window aspect ratio; #X obj 37 269 outlet; #X text 40 16 this abstraction can be used for texture display. i.e. if you use a subcontext at a fixed resolution to create a texture , this abstraction stretches the texture to the full size of the window .; #X obj 244 274 3dp_draw square 8; #X obj 244 220 3dp_view scale 1; #X text 405 219 <- extra scaling (i.e. to clip off garbage boundaries) ; #X obj 37 162 3dp_toggle depth_test 0; #X text 404 164 <- disable depth test so the draw will overwrite; #X obj 193 190 3dp_push; #X text 405 193 <- save modelview; #X text 27 295 context outlet; #X connect 0 0 10 0; #X connect 1 0 13 0; #X connect 2 0 10 1; #X connect 3 0 11 1; #X connect 11 0 0 0; #X connect 13 0 8 0; #X connect 13 1 15 0; #X connect 15 1 11 0;
--- NEW FILE: smoothupdate.pd --- #N canvas 112 570 450 387 10; #X obj 225 64 inlet; #X text 195 40 element to update; #X obj 23 63 inlet; #X text 39 39 new value; #X obj 55 302 outlet; #X obj 331 173 table $0-vec; #X obj 168 121 f 0; #X obj 168 150 tabread $0-vec; #X text 350 41 smooth step; #X obj 354 65 inlet; #X obj 354 90 moses 0; #X obj 366 116 moses 1; #X msg 331 114 0; #X msg 410 140 1; #X obj 135 182 -; #X obj 57 114 t f b; #X obj 332 144 f; #X obj 135 246 +; #X obj 146 282 tabwrite $0-vec; #X obj 23 86 route reset; #X msg 15 210 ; $1 const 0; #X msg 15 159 bang; #X obj 15 183 symbol $0-vec; #X obj 136 215 * 0.1; #X connect 0 0 6 1; #X connect 2 0 19 0; #X connect 6 0 7 0; #X connect 6 0 18 1; #X connect 7 0 14 1; #X connect 7 0 17 1; #X connect 9 0 10 0; #X connect 10 0 12 0; #X connect 10 1 11 0; #X connect 11 0 16 0; #X connect 11 1 13 0; #X connect 12 0 16 0; #X connect 13 0 16 0; #X connect 14 0 23 0; #X connect 15 0 14 0; #X connect 15 1 6 0; #X connect 16 0 23 1; #X connect 17 0 4 0; #X connect 17 0 18 0; #X connect 19 0 21 0; #X connect 19 1 15 0; #X connect 21 0 22 0; #X connect 22 0 20 0; #X connect 23 0 17 0;
--- NEW FILE: 3dp_basicscene.pd --- #N canvas 500 522 450 300 10; #X obj 54 72 metro 40; #X obj 54 140 3dp_push; #X floatatom 375 162 5 0 0 0 - - -; #X text 19 12 a basic 3d scene with a light source and mouse view rotation ; #X obj 54 218 outlet; #X obj 54 46 inlet; #X floatatom 340 129 5 0 0 0 - - -; #X floatatom 115 49 5 0 0 0 - - -; #X obj 254 216 3dp_light 0; #X obj 254 158 3dp_view roty; #X obj 254 192 3dp_view transz 10; #X obj 54 169 3dp_mouserotate; #X obj 54 111 3dp_windowcontext; #X connect 0 0 12 0; #X connect 1 0 11 0; #X connect 1 1 9 0; #X connect 2 0 10 1; #X connect 5 0 0 0; #X connect 6 0 9 1; #X connect 7 0 0 1; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 11 0 4 0; #X connect 12 0 1 0; #X connect 12 1 11 1;
--- NEW FILE: 3dp_screenshot.pd --- #N canvas 550 41 714 494 10; #X obj 193 284 pdp_reg; #X obj 193 203 pdp_t b p; #X obj 193 233 symbol $1; #X msg 193 257 save_png $1; #X obj 195 110 loadbang; #X msg 195 135 autosnap 0; #X obj 51 111 inlet; #X obj 51 176 3dp_snap bitmap/rgb/*; #X obj 51 285 outlet; #X text 41 22 make a screenshot of a 3dp context. creation argument is filename. send a bang to take a snapshot.; #X connect 1 0 2 0; #X connect 1 1 0 1; #X connect 2 0 3 0; #X connect 3 0 0 0; #X connect 4 0 5 0; #X connect 5 0 7 0; #X connect 6 0 7 0; #X connect 7 0 8 0; #X connect 7 1 1 0;
--- NEW FILE: 3dp_blend.pd --- #N canvas 554 145 570 225 10; #X obj 25 124 3dp_toggle depth_test 0; #X obj 181 159 3dp_toggle blend_add 1; #X obj 25 90 inlet; #X obj 330 199 outlet; #X text 38 11 use this object for quick and dirty blending effects. it has the depth test disabled and accumulated blending enabled.; #X text 128 60 NOTE: proper transparency is quite hard to do , because it requires manual depth sorting. there is no real support for this in 3dp yet.; #X connect 0 1 1 0; #X connect 1 1 3 0; #X connect 2 0 0 0;
--- NEW FILE: randomnormal.pd --- #N canvas 614 389 451 505 10; #X obj 48 58 inlet; #X obj 48 88 t b b; #X obj 173 167 * 6.28; #X obj 129 221 cos; #X obj 173 222 sin; #X obj 173 143 / 1e+06; #X obj 173 121 random 1e+06; #X obj 48 220 * -2; #X obj 48 170 / 1e+06; #X obj 48 125 random 1e+06; #X obj 48 148 + 1; #X obj 48 194 log; #X obj 48 327 *; #X obj 108 328 *; #X obj 48 292 t f f; #X obj 48 365 outlet; #X obj 108 365 outlet; #X text 35 10 normal gausian random number generator (box-muller); #X obj 48 253 sqrt; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 1 1 6 0; #X connect 2 0 4 0; #X connect 2 0 3 0; #X connect 3 0 12 1; #X connect 4 0 13 1; #X connect 5 0 2 0; #X connect 6 0 5 0; #X connect 7 0 18 0; #X connect 8 0 11 0; #X connect 9 0 10 0; #X connect 10 0 8 0; #X connect 11 0 7 0; #X connect 12 0 15 0; #X connect 13 0 16 0; #X connect 14 0 12 0; #X connect 14 1 13 0; #X connect 18 0 14 0;
--- NEW FILE: 3dp_fixedsizewindowcontext.pd --- #N canvas 634 346 592 397 10; #X obj 27 64 inlet; #X obj 27 105 3dp_windowcontext; #X obj 27 138 3dp_subcontext $1 $2; #X obj 220 211 outlet; #X obj 370 211 outlet; #X text 350 236 event outlet; #X obj 162 267 3dp_snap; #X obj 27 318 3dp_display_texture; #X text 150 23 a fixed size (window size independent) rendering context that can be used as 3dp_windowcontext replacement.; #X text 151 56 creation arguments are the context dimensions.; #X text 175 87 NOTE: the general subcontext rule applies: if the actual window size is small than the subcontext , or is covered by other windows , the results might not be what you expect.; #X text 176 236 context outlet (1); #X text 241 266 <- when the render chain connected to (1) is done; #X text 261 281 it will be snapped to texture; #X text 241 316 <- this texture will then be drawn to cover; #X text 263 332 the entire window size; #X obj 162 177 pdp_t p p; #X obj 184 300 inlet; #X connect 0 0 1 0; #X connect 1 0 2 0; #X connect 1 1 4 0; #X connect 2 0 7 0; #X connect 2 1 16 0; #X connect 6 1 7 1; #X connect 16 0 6 0; #X connect 16 1 3 0; #X connect 17 0 7 2;
--- NEW FILE: randomwalk2D.pd --- #N canvas 502 172 600 400 10; #X obj 228 221 tabread $0-x; #X obj 334 213 tabread $0-y; #X obj 228 310 tabwrite $0-x; #X obj 350 330 tabwrite $0-y; #X obj 244 259 cos; #X obj 350 266 sin; #X obj 351 241 * 0.0628; #X obj 351 185 random 100; #X obj 228 284 +; #X obj 334 291 +; #X obj 228 144 t f b f; #X msg 53 237 ; $1 const 0; #X obj 20 199 symbol $0-x; #X obj 108 199 symbol $0-y; #X msg 88 173 bang; #X obj 228 172 t f f; #X obj 214 337 outlet; #X obj 334 354 outlet; #X obj 156 82 inlet; #X obj 156 106 route reset; #X obj 351 82 table $0-x $1; #X obj 351 116 table $0-y $1; #X text 37 20 a 2D unit step random walk abstraction for use with 3dp_for ; #X text 335 45 creation argument = nb of vectors; #X text 64 44 inlet = vector to update; #X connect 0 0 8 0; #X connect 1 0 9 0; #X connect 4 0 8 1; #X connect 5 0 9 1; #X connect 6 0 4 0; #X connect 6 0 5 0; #X connect 7 0 6 0; #X connect 8 0 2 0; #X connect 8 0 16 0; #X connect 9 0 3 0; #X connect 9 0 17 0; #X connect 10 0 15 0; #X connect 10 1 7 0; #X connect 10 2 3 1; #X connect 10 2 2 1; #X connect 12 0 11 0; #X connect 13 0 11 0; #X connect 14 0 12 0; #X connect 14 0 13 0; #X connect 15 0 0 0; #X connect 15 1 1 0; #X connect 18 0 19 0; #X connect 19 0 14 0; #X connect 19 1 10 0;
--- NEW FILE: elbat.pd --- #N canvas 431 78 581 572 10; #X obj 23 63 inlet; #X obj 168 211 outlet; #X obj 168 150 tabread $0-vec; #X msg 15 210 ; $1 const 0; #X msg 15 159 bang; #X obj 15 183 symbol $0-vec; #X obj 119 373 until; #X msg 118 270 bang; #X obj 155 414 f 0; #X obj 191 414 + 1; #X msg 163 338 0; #X obj 119 318 t b b; #X obj 156 519 tabwrite $0-vec; #X obj 155 443 t b f; #X obj 154 478 randomnormal; #X obj 119 348 f $1; #X obj 23 86 route reset normal; #X text 168 274 fill table with normal distributed random variables ; #X text 19 16 a tabread-like abstraction (with internal table); #X obj 320 108 table $0-vec $1; #X connect 0 0 16 0; #X connect 2 0 1 0; #X connect 4 0 5 0; #X connect 5 0 3 0; #X connect 6 0 8 0; #X connect 7 0 11 0; #X connect 8 0 9 0; #X connect 8 0 13 0; #X connect 9 0 8 1; #X connect 10 0 8 1; #X connect 11 0 15 0; #X connect 11 1 10 0; #X connect 13 0 14 0; #X connect 13 1 12 1; #X connect 14 0 12 0; #X connect 15 0 6 0; #X connect 16 0 4 0; #X connect 16 1 7 0; #X connect 16 2 2 0;