RagingSwirl

Feb 4, 2006 at 12:18am

RagingSwirl

Hi All,
This week’s example uses jit.rota and jit.dimmap to perform some tricky
manipulation of a 3D matrix, and then spits it out to a swirly
jit.gl.isosurf shape.

Enjoy, and Happy Patching!

Andrew B.
Cycling ’74

max v2;
#N vpatcher 266 120 1123 475;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P hidden newex 41 303 106 196617 bgcolor 240 200 200;
#P comment 691 68 120 196617 andrewb@cycling74.com;
#P user ezdac~ 176 58 220 91 0;
#P toggle 769 181 15 0;
#P toggle 789 219 15 0;
#P toggle 748 219 15 0;
#P newex 707 240 92 196617 pak poly_mode 0 0;
#P toggle 609 224 15 0;
#P message 609 241 96 196617 smooth_shading $1;
#P toggle 516 225 15 0;
#P message 516 242 92 196617 lighting_enable $1;
#P newex 483 184 70 196617 prepend mode;
#P user ubumenu 483 163 100 196617 0 1 1 0;
#X add cubes;
#X add tetra;
#X prefix_set 0 0 0;
#X pattrmode 1;
#P flonum 426 165 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 426 185 55 196617 epsilon $1;
#P flonum 368 166 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 366 185 59 196617 isolevel $1;
#P window linecount 2;
#P newex 329 273 269 196617 jit.gl.isosurf swirl @lighting_enable 1
@color 0.3 0.5 0.7 0.95 @isolevel 0.11 @blend_enable 1 @depth_enable 1;
#B color 5;
#P window linecount 1;
#P message 41 265 68 196617 fullscreen $1;
#P toggle 24 264 15 0;
#P newex 66 240 35 196617 sel 27;
#P newex 24 240 40 196617 keyup;
#P newex 41 283 196 196617 jit.window swirl @depthbuffer 1 @fsaa 1;
#P newex 21 78 91 196617 t erase b b;
#B color 5;
#P newex 350 241 163 196617 jit.gl.handle swirl @auto_rotate 1;
#P newex 21 118 306 196617 jit.gl.render swirl @blend_enable 1
@erase_color 0.78 0.9 0.8 1.;
#P toggle 21 24 15 0;
#P newex 21 53 51 196617 qmetro 5;
#N vpatcher 302 395 845 998;
#P origin 0 -53;
#P window setfont “Sans Serif” 9.;
#P newex 98 409 201 196617 jit.rota 1 float32 50 50 25 @boundmode 4;
#P window linecount 0;
#P message 56 50 33 196617 clear;
#P message 433 235 43 196617 $1 500;
#P newex 433 256 40 196617 line;
#P message 433 276 67 196617 anchor_y $1;
#P message 299 277 43 196617 $1 500;
#P newex 299 296 40 196617 line 0.;
#P message 366 256 43 196617 $1 500;
#P newex 366 275 40 196617 line;
#P message 299 319 48 196617 theta $1;
#P newex 299 255 53 196617 * 0.0005;
#P newex 299 235 36 196617 – 500;
#P newex 299 216 70 196617 random 1000;
#P message 366 297 63 196617 anchor_x $1;
#P newex 433 215 58 196617 random 25;
#P newex 366 237 58 196617 random 25;
#P message 232 151 43 196617 $1 500;
#P newex 232 172 40 196617 line;
#P message 232 192 67 196617 anchor_y $1;
#P message 98 193 43 196617 $1 500;
#P newex 98 212 40 196617 line 0.;
#P message 165 172 43 196617 $1 500;
#P newex 165 191 40 196617 line;
#P newex 98 362 114 196617 jit.dimmap @map 2 0 1;
#P newex 98 340 90 196617 jit.rota @interp 1;
#P newex 98 305 114 196617 jit.dimmap @map 1 2 0;
#P newex 98 87 50 196617 qlim 200;
#P newex 98 111 346 196617 t b b b b b b;
#P message 98 235 48 196617 theta $1;
#P newex 98 171 53 196617 * 0.0005;
#P newex 98 151 36 196617 – 500;
#P newex 98 132 70 196617 random 1000;
#P message 165 213 63 196617 anchor_x $1;
#P newex 232 131 58 196617 random 25;
#P newex 165 153 58 196617 random 25;
#P newex 98 279 90 196617 jit.rota @interp 1;
#P inlet 7 20 15 0;
#P outlet 98 530 47 0;
#P newex 98 384 171 196617 jit.matrix brick 1 float32 25 25 25;
#P newex 7 73 81 196617 jit.matrix brick;
#P connect 38 0 0 0;
#P connect 3 0 0 0;
#P fasten 3 0 13 0 12 46 103 46;
#P connect 13 0 12 0;
#P connect 12 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P connect 10 0 20 0;
#P connect 20 0 19 0;
#P connect 19 0 11 0;
#P fasten 7 0 4 0 170 258 103 258;
#P fasten 11 0 4 0 103 278 103 278;
#P fasten 0 0 4 0 12 274 103 274;
#P fasten 21 0 4 0 237 263 103 263;
#P connect 4 0 14 0;
#P connect 14 0 15 0;
#P fasten 30 0 15 0 304 337 103 337;
#P fasten 26 0 15 0 371 337 103 337;
#P fasten 35 0 15 0 438 337 103 337;
#P connect 15 0 16 0;
#P connect 38 0 1 0;
#P connect 16 0 1 0;
#P connect 1 0 39 0;
#P connect 39 0 2 0;
#P connect 12 1 5 0;
#P connect 5 0 18 0;
#P connect 18 0 17 0;
#P connect 17 0 7 0;
#P connect 12 2 6 0;
#P connect 6 0 23 0;
#P connect 23 0 22 0;
#P connect 22 0 21 0;
#P connect 12 3 27 0;
#P connect 27 0 28 0;
#P connect 28 0 29 0;
#P connect 29 0 34 0;
#P connect 34 0 33 0;
#P connect 33 0 30 0;
#P connect 12 4 24 0;
#P connect 24 0 32 0;
#P connect 32 0 31 0;
#P connect 31 0 26 0;
#P connect 12 5 25 0;
#P connect 25 0 37 0;
#P connect 37 0 36 0;
#P connect 36 0 35 0;
#P pop;
#P newobj 329 118 41 196617 p video;
#N vpatcher 153 528 608 796;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 343 79 47 196617 *~ 0.15;
#P newex 343 58 61 196617 cycle~ 520;
#P newex 297 104 56 196617 +~;
#P newex 297 80 31 196617 abs~;
#P newex 297 58 45 196617 rand~ 9;
#P newex 268 156 38 196617 *~ 25;
#P newex 31 166 31 196617 abs~;
#P newex 235 81 47 196617 *~ 0.15;
#P newex 235 58 61 196617 cycle~ 520;
#P newex 189 105 56 196617 +~;
#P newex 127 80 47 196617 *~ 0.15;
#P newex 127 57 61 196617 cycle~ 500;
#P newex 81 104 56 196617 +~;
#P newex 189 81 31 196617 abs~;
#P newex 81 80 31 196617 abs~;
#P newex 31 141 51 196617 rand~ 13;
#P newex 189 58 45 196617 rand~ 9;
#P newex 81 57 45 196617 rand~ 9;
#P newex 189 156 38 196617 *~ 25;
#P newex 110 158 38 196617 *~ 25;
#P newex 31 187 248 196617 jit.poke~ brick 3 0;
#P connect 5 0 14 0;
#P connect 14 0 0 0;
#P connect 3 0 6 0;
#P connect 6 0 8 0;
#P connect 8 0 1 0;
#P connect 1 0 0 1;
#P connect 9 0 10 0;
#P connect 10 0 8 1;
#P connect 4 0 7 0;
#P connect 7 0 11 0;
#P connect 11 0 2 0;
#P connect 2 0 0 2;
#P connect 12 0 13 0;
#P connect 13 0 11 1;
#P connect 18 0 15 0;
#P connect 15 0 0 3;
#P connect 16 0 17 0;
#P connect 17 0 18 0;
#P connect 19 0 20 0;
#P connect 20 0 18 1;
#P pop;
#P newobj 372 118 32 196617 p bot;
#P window setfont “Sans Serif” 24.;
#P comment 636 33 175 196632 RagingSwirl;
#P connect 4 0 3 0;
#P connect 3 0 7 0;
#P fasten 7 1 5 0 66 106 26 106;
#P connect 7 0 5 0;
#P fasten 10 0 11 0 71 261 29 261;
#P fasten 11 0 12 0 40 279 40 264;
#P connect 12 0 8 0;
#P fasten 9 0 10 0 65 257 65 242;
#P fasten 4 0 28 0 26 47 181 47;
#P fasten 7 2 2 0 106 106 334 106;
#P fasten 24 0 13 0 712 268 334 268;
#P fasten 22 0 13 0 614 268 334 268;
#P fasten 20 0 13 0 521 268 334 268;
#P fasten 14 0 13 0 371 219 334 219;
#P fasten 16 0 13 0 431 219 334 219;
#P fasten 19 0 13 0 488 219 334 219;
#P fasten 6 0 13 0 355 265 334 265;
#P connect 2 0 13 0;
#P connect 15 0 14 0;
#P connect 17 0 16 0;
#P fasten 18 1 19 0 533 181 488 181;
#P connect 21 0 20 0;
#P connect 23 0 22 0;
#P fasten 27 0 25 0 774 206 753 206;
#P connect 25 0 24 1;
#P fasten 27 0 26 0 774 206 794 206;
#P connect 26 0 24 2;
#P pop;

#24270
Feb 4, 2006 at 8:11pm

Totally cool…thanks Andrew!

-B

#69918
Feb 6, 2006 at 9:18am

i may be missing something obvious, but that patch doesn’t display anything here. (jitter 1.5.2, osx) and i want it too, could be cool : )

#69919
Feb 6, 2006 at 4:25pm

#69920
Feb 6, 2006 at 4:37pm

No problems here either. Did you adjust the epsilon parameter? This
might help.

wes

#69921
Feb 6, 2006 at 4:44pm

If there are no error messages, try changing the isolevel.
Does the background color render properly?

AB

#69922
Feb 6, 2006 at 8:58pm

sorry my mistake, it was a problem with the audio, had a fwdevice removed and didn’t reset all settings manually.
cool patch btw

#69923

You must be logged in to reply to this topic.