Forums > Jitter

[sharing is stuff] vector fields thingy

January 28, 2008 | 10:23 pm

Rgds,

Brecht.

max v2;
#N vpatcher 81 44 1052 778;
#P origin 0 -2;
#P window setfont "Sans Serif" 9.;
#P flonum 565 203 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P message 443 382 86 196617 lighting_enable 0;
#P newex 773 241 69 196617 prepend expr;
#P user ubumenu 631 220 294 196617 0 1 1 0;
#X add "in[0].p[0]*0.1" "in[0].p[1]*0.1";
#X add "-in[0].p[1]*0.1" "in[0].p[0]*0.1";
#X add "in[0].p[1]*0.1" "in[0].p[0]*0.1";
#X add "0.1*in[0].p[0]/sqrt(in[0].p[0]*in[0].p[0] + in[0].p[1]*in[0].p
[1])" "0.1*in[0].p[1]/sqrt(in[0].p[0]*in[0].p[0] + in[0].p[1]*in[0].p
[1])";
#X add "(in[0].p[0]*-in[0].p[1])*0.1" "(in[0].p[1]-in[0].p[0])*0.1";
#X add "0.05*(in[0].p[0]+(in[0].p[1]*in[0].p[1]))" "((in[0].p[0]*in
[0].p[0])-in[0].p[1])*0.05";
#X prefix_set 0 0 0;
#P newex 467 222 108 196617 jit.op @op * @val 0.1;
#P number 610 22 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 610 40 56 196617 dim $1 $1;
#P newex 482 78 102 196617 jit.op @op * @val 4.;
#P newex 413 260 64 196617 jit.op @op +;
#P newex 482 59 106 196617 jit.op @op – @val 0.5;
#P newex 482 40 101 196617 jit.noise 2 float32 5;
#P user gswitch 467 123 41 32 0 0;
#P newex 316 323 100 196617 prepend draw_mode;
#P user ubumenu 317 300 68 196617 0 1 1 0;
#X add points;
#X add lines;
#X add line_strip;
#X add line_loop;
#X add triangles;
#X add tri_strip;
#X add tri_fan;
#X add quads;
#X add quad_strip;
#X add polygon;
#X add tri_grid;
#X prefix_set 0 0
0;
#X pattrmode 1;
#P number 678 301 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 678 326 71 196617 point_size $1;
#P number 666 281 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 630 281 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 630 302 46 196617 pak 0 0;
#P message 425 326 252 196617 color 1. 1 1. 1. , blend_enable 1 ,
blend_mode $1 $2;
#P newex 413 345 202 196617 jit.gl.mesh vectors @draw_mode tri_strip;
#P newex 413 282 98 196617 jit.matrix particles;
#P newex 467 182 243 196617 jit.expr @expr "snorm[0]*0.01" "snorm[1]
*0.01";
#P button 454 21 15 0;
#P newex 535 126 41 196617 r pulse;
#P newex 466 158 196 196617 jit.matrix particles 2 float32 5 @adapt 1;
#P newex 592 80 269 196617 jit.gencoord 2 float32 100 100 @offset -2
-2 @scale 4 4;
#N counter 0 7;
#X flags 0 0;
#P newobj 367 101 66 196617 counter 0 7;
#P newex 367 82 67 196617 select 27 13;
#P newex 367 63 40 196617 key;
#P flonum 197 193 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 197 211 73 196617 slide_down $1;
#P flonum 134 193 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 134 211 60 196617 slide_up $1;
#P newex 9 280 45 196617 jit.slide;
#P newex 251 145 69 196617 prepend expr;
#P user ubumenu 126 125 294 196617 0 1 1 0;
#X add "snorm[0]*0.1" "snorm[1]*0.1";
#X add "-snorm[1]*0.1" "snorm[0]*0.1";
#X add "snorm[1]*0.1" "snorm[0]*0.1";
#X add "snorm[0]*0.1/sqrt(snorm[0]*snorm[0]+snorm[1]*snorm[1])" "snorm
[1]*0.1/sqrt(snorm[0]*snorm[0]+snorm[1]*snorm[1])";
#X add "(snorm[1]*snorm[1])*0.1" "snorm[0]*0.";
#X add "((snorm[0]*snorm[0])-snorm[1])*0.1" "(snorm[0]+(snorm[1]*snorm
[1]))*0.1";
#X add "(snorm[0]+(snorm[1]*snorm[1]))*0.1" "((snorm[0]*snorm[0])-
snorm[1])*0.1";
#X add "(snorm[0]*-snorm[1])*0.1" "(snorm[1]-snorm[0])*0.1";
#X add "(-snorm[1]*snorm[2])*0.1" "(snorm[0]*snorm[2])*0.1" "snorm[2]
*0.1";
#X prefix_set 0 0
0;
#P newex 124 173 243 196617 jit.expr @expr "snorm[0]*0.01" "snorm[1]
*0.01";
#P newex 65 193 64 196617 jit.op @op +;
#P message 290 85 74 196617 savewindow 1;
#N thispatcher;
#Q window flags grow close zoom nofloat;
#Q window size 81 44 1052 778;
#Q window title;
#Q window exec;
#Q savewindow 1;
#Q end;
#P newobj 290 103 61 196617 thispatcher;
#P number 54 63 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 54 82 56 196617 dim $1 $1;
#P number 245 260 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 209 260 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 209 280 46 196617 pak 0 0;
#P message 21 304 261 196617 color 0.6 0. 0. 0. , blend_enable 1 ,
blend_mode $1 $2;
#P newex 9 323 183 196617 jit.gl.mesh vectors @draw_mode lines;
#P newex 9 214 66 196617 jit.multiplex;
#P newex 9 83 41 196617 r pulse;
#P newex 9 103 280 196617 jit.gencoord 2 float32 10 10 @offset -2 -2
-2 @scale 4 4 4;
#P connect 1 0 0 0;
#P fasten 8 0 0 0 59 101 14 101;
#P connect 0 0 2 0;
#P fasten 19 0 16 0 202 277 14 277;
#P fasten 17 0 16 0 139 277 14 277;
#P connect 2 0 16 0;
#P connect 16 0 3 0;
#P fasten 4 0 3 0 26 321 14 321;
#P fasten 5 0 4 0 214 301 26 301;
#P connect 9 0 8 0;
#P connect 0 0 12 0;
#P connect 12 0 2 1;
#P connect 13 0 12 1;
#P connect 48 0 13 0;
#P fasten 0 0 13 0 14 146 129 146;
#P fasten 15 0 13 0 256 168 129 168;
#P connect 18 0 17 0;
#P connect 20 0 19 0;
#P connect 6 0 5 0;
#P connect 7 0 5 1;
#P fasten 14 1 15 0 273 143 256 143;
#P connect 11 0 10 0;
#P fasten 37 1 38 0 351 319 321 319;
#P connect 21 0 22 0;
#P connect 22 0 23 0;
#P connect 25 0 42 0;
#P connect 42 0 29 0;
#P connect 49 0 30 0;
#P connect 29 0 30 0;
#P fasten 38 0 30 0 321 342 418 342;
#P fasten 31 0 30 0 430 343 418 343;
#P fasten 35 0 30 0 683 343 418 343;
#P fasten 32 0 31 0 635 322 430 322;
#P connect 22 1 27 0;
#P connect 26 0 25 0;
#P connect 39 0 25 0;
#P connect 48 0 28 0;
#P connect 25 0 28 0;
#P fasten 15 0 28 0 256 168 472 168;
#P connect 28 0 46 0;
#P connect 46 0 42 1;
#P fasten 27 0 40 0 459 38 487 38;
#P connect 44 0 40 0;
#P connect 40 0 41 0;
#P connect 41 0 43 0;
#P connect 43 0 39 1;
#P connect 24 0 39 2;
#P connect 50 0 46 1;
#P connect 27 0 24 0;
#P connect 45 0 44 0;
#P connect 33 0 32 0;
#P connect 23 0 47 0;
#P connect 34 0 32 1;
#P connect 36 0 35 0;
#P connect 47 1 48 0;
#P pop;


January 29, 2008 | 3:07 pm

Looks interesting, but what does it do and is there a way to get any output?


January 29, 2008 | 3:21 pm

I noticed this one was missing a render destination, add a
jit.gl.render, the normal t b b erase, send pangs to pulse and make a
window, and, uh, a qmetro :) then it works.

On Jan 29, 2008, at 10:07 AM, Bas van der Graaff wrote:

>
> Looks interesting, but what does it do and is there a way to get any
> output?
> –
> SmadSteck – http://www.smadsteck.nl
> Hard- and software for interactive audiovisual sampling


January 29, 2008 | 6:05 pm

I get a whole lot of errors when I try to use the escape key to send counter
numbers to the [expr] object. Anyone else having this problem?

On Jan 29, 2008 10:21 AM, vade wrote:

> I noticed this one was missing a render destination, add a
> jit.gl.render, the normal t b b erase, send pangs to pulse and make a
> window, and, uh, a qmetro :) then it works.
>
>
> On Jan 29, 2008, at 10:07 AM, Bas van der Graaff wrote:
>
> >
> > Looks interesting, but what does it do and is there a way to get any
> > output?
> > –
> > SmadSteck – http://www.smadsteck.nl
> > Hard- and software for interactive audiovisual sampling
>
>


http://www.bryanteoh.com
http://www.icelu.net

http://www.ksod.net


January 30, 2008 | 11:41 am

Weird. I thought I pasted this patch :
I’ve got the impression that my puter sometimes has trouble
copy/pasting…this one should work without any probs though (and is
cleaned up as intended)
Apologies.

max v2;
#N vpatcher 81 44 796 523;
#P origin 0 -2;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 290 102 60 196617 loadmess 0;
#P newex 481 231 48 196617 loadbang;
#P newex 194 234 48 196617 loadbang;
#P message 131 351 34 196617 reset;
#P newex 131 368 203 196617 jit.gl.handle vectors @inherit_transform 1;
#N vpatcher 30 89 161 286;
#P outlet 8 116 15 0;
#P window setfont "Sans Serif" 9.;
#P message 8 96 70 196617 fullscreen $1;
#P toggle 8 73 15 0;
#P newex 8 48 52 196617 select 27;
#P newex 8 25 40 196617 key;
#P connect 0 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 3 0;
#P connect 3 0 4 0;
#P pop;
#P newobj 9 411 25 196617 p fs;
#P newex 33 369 41 196617 s pulse;
#P newex 9 432 324 196617 jit.window vectors @floating 1 @fsaa 0
@fsmenubar 0 @pos 800 274;
#P toggle 9 305 15 0;
#P newex 9 344 58 196617 t b b erase;
#P newex 9 324 57 196617 qmetro 20;
#P newex 9 391 284 196617 jit.gl.render vectors @erase_color 0 0 0 1
@camera 0. 0. 6.;
#P newex 277 146 69 196617 prepend expr;
#P user ubumenu 135 125 294 196617 0 1 1 0;
#X add "in[0].p[0]*0.1" "in[0].p[1]*0.1";
#X add "-in[0].p[1]*0.1" "in[0].p[0]*0.1";
#X add "in[0].p[1]*0.1" "in[0].p[0]*0.1";
#X add "0.1*in[0].p[0]/sqrt(in[0].p[0]*in[0].p[0] +
in[0].p[1]*in[0].p[1])" "0.1*in[0].p[1]/sqrt(in[0].p[0]*in[0].p[0] +
in[0].p[1]*in[0].p[1])";
#X add "(in[0].p[0]*-in[0].p[1])*0.1" "(in[0].p[1]-in[0].p[0])*0.1";
#X add "0.05*(in[0].p[0]+(in[0].p[1]*in[0].p[1]))"
"((in[0].p[0]*in[0].p[0])-in[0].p[1])*0.05";
#X prefix_set 0 0 0;
#P newex 436 190 108 196617 jit.op @op * @val 0.1;
#P newex 436 122 102 196617 jit.op @op * @val 4.;
#P newex 382 211 64 196617 jit.op @op +;
#P newex 436 103 106 196617 jit.op @op – @val 0.5;
#P newex 436 84 134 196617 jit.noise 2 float32 100 100;
#P message 394 252 240 196617 color 1. 1 1. 1. , blend_enable 1 ,
blend_mode 1 1;
#P newex 382 271 189 196617 jit.gl.mesh vectors @draw_mode points;
#P newex 382 231 98 196617 jit.matrix particles;
#P newex 436 169 243 196617 jit.expr @expr "snorm[0]*0.01" "snorm[1]*0.01";
#P newex 539 122 41 196617 r pulse;
#P newex 436 146 196 196617 jit.matrix particles 2 float32 5 @adapt 1;
#N counter 0 5;
#X flags 0 0;
#P newobj 367 101 66 196617 counter 0 5;
#P newex 367 62 67 196617 select 32 13;
#P newex 367 43 40 196617 key;
#P newex 9 234 184 196617 jit.slide @slide_up 10 @slide_down 10;
#P newex 119 172 243 196617 jit.expr @expr "snorm[0]*0.01" "snorm[1]*0.01";
#P newex 65 193 64 196617 jit.op @op +;
#P message 21 258 249 196617 color 0.6 0. 0. 0. , blend_enable 1 ,
blend_mode 1 1;
#P newex 9 277 183 196617 jit.gl.mesh vectors @draw_mode lines;
#P newex 9 214 66 196617 jit.multiplex;
#P newex 9 81 41 196617 r pulse;
#P newex 9 102 280 196617 jit.gencoord 2 float32 20 20 @offset -2 -2 -2
@scale 4 4 4;
#P comment 25 306 52 196617 < < start;
#P window linecount 4;
#P comment 265 43 100 196617 space: change field , esc: fullscreen ,
enter: reset particles;
#P connect 3 0 2 0;
#P connect 2 0 4 0;
#P connect 4 0 9 0;
#P connect 9 0 5 0;
#P fasten 6 0 5 0 26 275 14 275;
#P connect 29 0 27 0;
#P connect 27 0 28 0;
#P fasten 33 0 26 0 136 388 14 388;
#P connect 28 0 26 0;
#P fasten 28 2 26 0 62 365 14 365;
#P connect 32 0 30 0;
#P fasten 35 0 6 0 199 254 26 254;
#P connect 28 1 31 0;
#P fasten 2 0 7 0 14 186 70 186;
#P connect 7 0 4 1;
#P fasten 25 0 8 0 282 168 124 168;
#P fasten 2 0 8 0 14 146 124 146;
#P connect 8 0 7 1;
#P connect 34 0 33 0;
#P fasten 37 0 24 0 295 121 140 121;
#P fasten 12 0 24 0 372 121 140 121;
#P connect 24 1 25 0;
#P connect 10 0 11 0;
#P connect 11 0 12 0;
#P fasten 13 0 21 0 441 166 387 166;
#P connect 21 0 16 0;
#P fasten 18 0 17 0 399 269 387 269;
#P connect 16 0 17 0;
#P fasten 36 0 18 0 486 250 399 250;
#P fasten 11 1 19 0 400 82 441 82;
#P connect 19 0 20 0;
#P connect 20 0 22 0;
#P connect 22 0 13 0;
#P fasten 14 0 13 0 544 142 441 142;
#P fasten 25 0 15 0 282 168 441 168;
#P connect 13 0 15 0;
#P connect 15 0 23 0;
#P connect 23 0 21 1;
#P pop;


Viewing 5 posts - 1 through 5 (of 5 total)