spherical harmonics


    Jun 29 2006 | 8:11 pm
    here's one more from that same collection of algorithms.
    jeremy
    max v2;
    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~~ ~~ ~
    New Work: Image-Producing Machine for the Vague-Terrain journal

    • Jun 29 2006 | 9:01 pm
      Yet again, totally badass. This is great.
      Thanks for sharing - and distracting me from fixing Avids and Final
      Cuts all day long ;)
      v a d e //
      www.vade.info
      abstrakt.vade.info
      On Jun 29, 2006, at 4:11 PM, Jeremy Rotsztain wrote:
      >
      > here's one more from that same collection of algorithms.
      >
      > http://astronomy.swin.edu.au/~pbourke/surfaces/sphericalh/
      >
      > jeremy
      >
      > max v2;
      > #N vpatcher 100 100 969 667;
      > #P window setfont "Sans Serif" 9.;
      > #P comment 751 109 21 196617 m7;
      > #P comment 696 109 21 196617 m6;
      > #P comment 640 114 21 196617 m5;
      > #P flonum 751 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 697 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 643 136 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 589 136 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P comment 591 112 21 196617 m4;
      > #P toggle 515 363 15 0;
      > #P toggle 535 400 15 0;
      > #P toggle 494 399 15 0;
      > #P newex 453 420 92 196617 pak poly_mode 0 0;
      > #P newex 570 376 78 196617 jit.gl.gridshape;
      > #P user jit.fpsgui 278 215 60 196617 3;
      > #P newex 408 348 63 196617 s to_render;
      > #P hidden newex 387 63 370 196617 unpack f f f f f f f f;
      > #P hidden newex 388 37 222 196617 loadmess 2 4 8 3 9 5 8 1;
      > #P flonum 265 386 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 269 306 66 196617 loadmess 10;
      > #P comment 540 111 21 196617 m3;
      > #P comment 485 111 21 196617 m2;
      > #P comment 429 114 21 196617 m1;
      > #P flonum 540 136 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 486 136 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 432 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 378 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #N vpatcher 99 275 1241 920;
      > #P window setfont "Sans Serif" 9.;
      > #P window linecount 1;
      > #P newex 206 441 184 196617 jit.slide @slide_up 20 @slide_down 20;
      > #P newex 120 227 351 196617 jit.expr @inputs 3 @expr "in[0]+pow(cos
      > (in[1]*norm[1]*TWOPI)\, in[2])";
      > #P newex 120 204 349 196617 jit.expr @inputs 3 @expr "in[0]+pow(sin
      > (in[1]*norm[1]*TWOPI)\, in[2])";
      > #P newex 121 181 351 196617 jit.expr @inputs 3 @expr "in[0]+pow(cos
      > (in[1]*norm[0]*PI)\, in[2])";
      > #P newex 120 161 321 196617 jit.expr @inputs 3 @expr "pow(sin(in[1]
      > *norm[0]*PI)\, in[2])";
      > #P inlet 986 60 15 0;
      > #P inlet 853 64 15 0;
      > #P inlet 724 50 15 0;
      > #P inlet 662 53 15 0;
      > #P flonum 967 125 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 856 112 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 758 113 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 675 112 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P outlet 192 537 15 0;
      > #P newex 192 507 53 196617 jit.concat;
      > #P newex 234 470 115 196617 jit.op @op pass pass !-;
      > #P newex 193 306 787 196617 jit.expr 3 float32 64 64 @inputs 2
      > @expr "((in[0]*sin(norm[0]*PI)*cos(norm[1]*TWOPI))" "((in[0]*cos
      > (norm[0]*PI))" "in[0]*sin(norm[0]*PI)*sin(norm[1]*TWOPI)";
      > #P inlet 585 62 15 0;
      > #P inlet 452 66 15 0;
      > #P inlet 323 52 15 0;
      > #P inlet 261 55 15 0;
      > #P button 71 100 15 0;
      > #P window linecount 0;
      > #P newex 120 107 60 196617 r to_movie;
      > #P user jit.pwindow 48 275 82 62 0 1 0 0 1 0;
      > #P newex 120 133 142 196617 jit.matrix 1 float32 64 64;
      > #P flonum 566 127 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 455 114 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 357 115 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P flonum 274 114 35 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P connect 6 0 4 0;
      > #P connect 7 0 4 0;
      > #P connect 4 0 24 0;
      > #P connect 25 0 26 0;
      > #P connect 26 0 27 0;
      > #P connect 24 0 25 0;
      > #P connect 28 0 14 0;
      > #P connect 14 0 15 0;
      > #P connect 27 0 12 0;
      > #P connect 12 0 28 0;
      > #P connect 28 0 13 0;
      > #P connect 13 0 14 1;
      > #P connect 8 0 0 0;
      > #P connect 0 0 24 1;
      > #P connect 16 0 26 1;
      > #P connect 18 0 27 1;
      > #P connect 2 0 25 1;
      > #P connect 9 0 1 0;
      > #P connect 1 0 24 2;
      > #P connect 10 0 2 0;
      > #P connect 17 0 26 2;
      > #P connect 19 0 27 2;
      > #P connect 3 0 25 2;
      > #P connect 11 0 3 0;
      > #P connect 20 0 16 0;
      > #P connect 21 0 17 0;
      > #P connect 22 0 18 0;
      > #P connect 23 0 19 0;
      > #P pop;
      > #P newobj 378 175 391 196617 p 3d-supershape;
      > #P user ubumenu 273 346 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;
      > #P flonum 195 346 35 9 0. 1. 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P newex 79 369 129 196617 pak erase_color 0. 0. 0. 0.;
      > #P newex 78 507 220 196617 jit.window context @floating 1
      > @depthbuffer 1;
      > #P newex 121 164 59 196617 s to_movie;
      > #P newex 179 107 62 196617 s to_render;
      > #P newex 92 198 62 196617 s to_render;
      > #P newex 150 134 55 196617 s to_shape;
      > #P number 79 35 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
      > #P user jit.fpsgui 34 239 63 196617 0;
      > #P message 103 414 33 196617 reset;
      > #P newex 92 392 62 196617 r to_render;
      > #P newex 103 435 274 196617 jit.gl.handle context @auto_rotate 1
      > @inherit_transform 1;
      > #P newex 34 77 156 196617 t b b b b b erase;
      > #P toggle 34 34 15 0;
      > #P newex 34 54 55 196617 qmetro 50;
      > #P newex 78 476 471 196617 jit.gl.render context @lighting_enable 1
      > @smooth_shading 1 @depth_enable 1 @erase_color 0. 0. 0. 1.;
      > #P comment 380 114 22 196617 m0;
      > #P connect 3 0 2 0;
      > #P connect 2 0 4 0;
      > #P connect 4 0 8 0;
      > #P fasten 5 0 1 0 108 472 83 472;
      > #P connect 15 0 1 0;
      > #P connect 17 1 1 0;
      > #P fasten 6 0 1 0 97 472 83 472;
      > #P connect 33 0 1 0;
      > #P connect 9 0 2 1;
      > #P connect 4 2 11 0;
      > #P connect 7 0 5 0;
      > #P connect 4 3 13 0;
      > #P connect 4 4 10 0;
      > #P connect 4 5 12 0;
      > #P connect 16 0 15 4;
      > #P connect 17 0 27 0;
      > #P connect 26 0 17 0;
      > #P connect 18 0 31 0;
      > #P hidden connect 29 0 19 0;
      > #P connect 19 0 18 0;
      > #P hidden connect 28 0 29 0;
      > #P connect 18 0 30 0;
      > #P hidden connect 29 1 20 0;
      > #P connect 20 0 18 1;
      > #P hidden connect 29 2 21 0;
      > #P connect 21 0 18 2;
      > #P fasten 36 0 34 0 520 388 499 388;
      > #P connect 34 0 33 1;
      > #P fasten 36 0 35 0 520 389 540 389;
      > #P connect 35 0 33 2;
      > #P hidden connect 29 3 22 0;
      > #P connect 22 0 18 3;
      > #P hidden connect 29 4 38 0;
      > #P connect 38 0 18 4;
      > #P hidden connect 29 5 39 0;
      > #P connect 39 0 18 5;
      > #P hidden connect 29 6 40 0;
      > #P connect 40 0 18 6;
      > #P hidden connect 29 7 41 0;
      > #P connect 41 0 18 7;
      > #P pop;
      >
      >
      > ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~~ ~~ ~~ ~
      >
      > http://www.mantissa.ca
      >
      > New Work: Image-Producing Machine for the Vague-Terrain journal
      > http://www.vagueterrain.net/content/archives/journal03/journal03.html
      >
    • Jul 01 2006 | 7:59 am
      yeah! the mighty jkc helped me to fix the expressions for the wonderful harmonics recently. they are great!
      a spherical harmonic a day keeps the doctor away!
      hurra, dd