[jitter] Re: Re: Re: Silly jit.gl.sketch problem
Solomon Bothwell
ssbothwell at ucdavis.edu
Wed Nov 7 23:29:16 MST 2007
- Previous message: [jitter] Re: Re: Re: Silly jit.gl.sketch problem
- Next message: [jitter] Re: Re: Re: v001 Shaders Beta 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I decided to use the pmpd library to assist with modeling my string using Mathieu Chamagne's mcpmpd.mass3d and mcpmpd.link3d abstractions. I want to draw cylinders inbetween each mass model instead of using line segments so I used vexpr to do some trig. I haven't setup rotation for the cylinders yet but the lengths and position formulas seem correct. However the midpoints dont seem to be matching up with my mass3d models. Heres the trig functions I setup: Let me know if the full patch is needed. #P window setfont "Sans Serif" 9.; #P window linecount 1; #P message 81 363 193 196617 move \$1 \$2 \$3 \, cylinder 0.05 0.05 \$4; #P comment 280 242 86 196617 distance formula; #P newex 158 240 105 196617 unpack 0. 0.; #P newex 158 268 105 196617 expr sqrt($f1 + $f2); #P newex 158 217 156 196617 vexpr pow((abs($f1 - $f2))\\\,2); #P newex 187 150 104 196617 vexpr ($f1 + $f2)/2; #P newex 7 422 459 196617 jit.gl.sketch MC.PMPD @depth_enable 1 @smooth_shading 1 @lighting_enable 1 @shininess 1; #B color 5; #P newex 158 92 90 196617 route linesegment; #P newex 158 120 51 196617 zl slice 3; #P comment 296 151 86 196617 midpoint formula; #P user panel 182 144 210 32; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P user panel 153 208 222 81; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P newex 81 339 38 196617 zl join; #P newex 67 282 36 196617 zl reg; #P newex 158 297 27 196617 t b l; #P comment 250 94 100 196617 x1 y1 z1 x2 y2 z2; #P connect 15 0 9 0; #P connect 1 0 2 0; #P connect 2 0 3 0; #P connect 3 0 15 0; #P connect 10 0 2 1; #P connect 1 1 3 1; #P connect 8 0 7 0; #P connect 7 0 11 0; #P connect 11 0 13 0; #P connect 13 0 12 0; #P connect 12 0 1 0; #P connect 7 0 10 0; #P connect 13 1 12 1; #P connect 7 1 10 1; #P connect 10 0 11 1; #P window clipboard copycount 16;
- Previous message: [jitter] Re: Re: Re: Silly jit.gl.sketch problem
- Next message: [jitter] Re: Re: Re: v001 Shaders Beta 2
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
