direction cosines, math problem


    Sep 29 2007 | 9:50 pm
    hi, i am trying to make a plane always keep its orientation facing the center. after some digging i have found i need to use " direction cosines" to extract the angles. but something is wrong.

    • Sep 30 2007 | 8:50 am
      this is better, but its 2d, how do i convert Cartesian to polar in 3d?(!) the equation at the bottom of this page makes no sense, i need three radians to correctly Orient the cube, this gives me 2 and a length. pls good ppl of intranet... http://electron9.phys.utk.edu/vectors/3dcoordinates.htm
      On 9/29/07, yair reshef wrote: > > hi, i am trying to make a plane always keep its orientation facing the > center. after some digging i have found i need to use " direction cosines" > to extract the angles. but something is wrong. > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P message 82 525 86 9109513 rotatexyz $1 $2 $3; > #P comment 22 453 55 9109513 rad to deg; > #P newex 82 545 37 9109513 s toVid; > #P newex 82 503 40 9109513 jit.iter; > #P newex 82 475 103 9109513 jit.op @op * @val 180.; > #P newex 82 452 107 9109513 jit.op @op / @val 3.141; > #P newex 82 400 68 9109513 jit.op @op cos; > #P comment 1 402 78 9109513 direction cosines; > #P newex 82 321 56 9109513 t l l; > #P newex 82 372 56 9109513 jit.op @op /; > #P comment 16 374 53 9109513 unit vector; > #P newex 128 343 311 9109513 jit.expr @expr > sqrt(pow(in[0].p[0]\,2)+pow(in[0].p[1]\,2)+pow(in[0].p[2]\,2)); > #P newex 263 186 55 9109513 jit.multiplex; > #P newex 263 155 92 9109513 jit.matrix 3 float32 1; > #P window linecount 3; > #P newex 263 213 87 9109513 jit.gl.mesh quadr @draw_mode lines > @blend_enable 1; > #P window linecount 2; > #P newex 18 282 130 9109513 jit.gl.gridshape quadr @shape sphere @scale > 0.1 0.1 0.1; > #P window linecount 1; > #P newex 380 250 37 9109513 s toVid; > #P newex 18 209 35 9109513 r toVid; > #P newex 369 43 31 9109513 r draz; > #P newex 389 86 63 9109513 speedlim 500; > #P newex 369 64 30 9109513 t b b; > #P newex 369 134 44 9109513 jit.matrix; > #P newex 380 160 162 9109513 jit.slide @slide_up 5. @slide_down 5.; > #P newex 380 206 38 9109513 t b l; > #P newex 380 184 40 9109513 jit.iter; > #P newex 389 107 88 9109513 jit.noise 3 float32 1; > #P newex 1 27 45 9109513 loadbang; > #P message 1 48 81 9109513 texture grid 64 64; > #P message 91 96 29 9109513 reset; > #P window linecount 2; > #P newex 91 115 95 9109513 jit.gl.handle quadr @inherit_transform 1; > #P window linecount 3; > #P newex 18 232 132 9109513 jit.gl.videoplane quadr @texture grid @color 1 > 1 1 0.2 @blend_enable 1; > #P toggle 17 70 15 0; > #P window linecount 1; > #P newex 17 91 50 9109513 qmetro 5; > #P newex 46 136 33 9109513 s draz; > #P newex 17 114 71 9109513 t b b erase; > #P newex 17 183 73 9109513 jit.window quadr; > #P newex 17 161 160 9109513 jit.gl.render quadr @camera 0 5 0.01; > #P newex 380 228 96 9109513 pack position 0. 0. 0.; > #P comment 63 345 62 9109513 length of line; > #P window linecount 3; > #P comment 155 402 161 9109513 <<< like > http://www.geom.uiuc.edu/docs/reference/CRC-formulas/node52.html; > #P connect 33 0 34 0; > #P fasten 18 0 31 0 374 317 87 317; > #P connect 18 0 17 0; > #P connect 39 0 37 0; > #P connect 36 0 39 0; > #P connect 13 0 12 0; > #P connect 13 0 8 0; > #P connect 8 0 7 0; > #P connect 7 0 5 0; > #P fasten 12 0 3 0 6 149 22 149; > #P fasten 5 2 3 0 82 157 22 157; > #P connect 5 0 3 0; > #P fasten 10 0 3 0 96 159 22 159; > #P connect 22 0 9 0; > #P connect 5 1 6 0; > #P connect 31 0 30 0; > #P connect 30 0 33 0; > #P connect 34 0 35 0; > #P connect 35 0 36 0; > #P connect 11 0 10 0; > #P connect 31 1 28 0; > #P fasten 28 0 30 1 133 367 133 367; > #P fasten 19 0 26 0 374 108 268 108; > #P connect 26 0 27 0; > #P connect 27 0 25 0; > #P fasten 17 0 27 1 385 180 313 180; > #P connect 21 0 19 0; > #P connect 19 0 18 0; > #P fasten 14 0 18 0 394 130 374 130; > #P connect 17 0 15 0; > #P connect 15 0 16 0; > #P connect 16 0 2 0; > #P fasten 2 0 23 0 385 248 385 248; > #P connect 19 1 20 0; > #P connect 20 0 14 0; > #P connect 16 1 2 1; > #P window clipboard copycount 40; > > >
    • Sep 30 2007 | 9:27 am
      On 9/30/07, yair reshef wrote: > this is better, but its 2d, how do i convert Cartesian to polar in 3d?(!)
      wes
    • Sep 30 2007 | 11:09 am
      thanks wes, the page you directed me is missing a formula to find the zenith(?) angle (probably me missing the point). i followed wikipedia on this, also switched from arctang to atan2. bu still no good, i still thnk i am missing an angle. http://en.wikipedia.org/wiki/Spherical_coordinates
      On 9/30/07, Wesley Smith wrote: > > On 9/30/07, yair reshef wrote: > > this is better, but its 2d, how do i convert Cartesian to polar in > 3d?(!) > > http://local.wasp.uwa.edu.au/~pbourke/geometry/coords/ > > > wes >
    • Sep 30 2007 | 6:37 pm
      i switched the x and y at the atan2 formula, i understand now there are only two values as roll is not given. i'll find another way to retrieve it. the working patch for posterity.
      On 9/30/07, yair reshef wrote: > > thanks wes, the page you directed me is missing a formula to find the > zenith(?) angle (probably me missing the point). > i followed wikipedia on this, also switched from arctang to atan2. bu > still no good, i still thnk i am missing an angle. > http://en.wikipedia.org/wiki/Spherical_coordinates > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P message 224 466 45 9109513 $1 $2 0.; > #B color 5; > #P newex 224 442 40 9109513 jit.iter; > #P newex 194 493 101 9109513 pak rotatexyz 0. 0. 0.; > #P newex 196 518 37 9109513 s toVid; > #P window setfont "Sans Serif" 14.; > #P newex 224 403 222 9109518 jit.expr @expr "(in[0]*180.)/ 3.141"; > #P window setfont "Sans Serif" 9.; > #P message 453 561 154 9109513 81.863235 80.227272 1.677804; > #P newex 453 538 57 9109513 prepend set; > #P newex 454 495 56 9109513 jit.unpack 3; > #P user jit.cellblock 552 515 600 536 139 9 1 1 45 17 0 1 1 0 0 0 0 0 1 0 > 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0; > #P user jit.cellblock 502 515 550 536 139 9 1 1 45 17 0 1 1 0 0 0 0 0 1 0 > 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0; > #P user jit.cellblock 454 515 502 536 139 9 1 1 45 17 0 1 1 0 0 0 0 0 1 0 > 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4 0 0 0; > #P window setfont "Sans Serif" 14.; > #P window linecount 2; > #P newex 224 354 374 9109518 jit.expr @expr > "atan2((pow(in[0].p[0]\,2)+pow(in[0].p[1]\,2)) \, in[0].p[2])" > "atan2(in[0].p[0]\, in[0].p[1])" in[0].p[2]; > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P newex 396 128 92 9109513 jit.op @op - @val 1.; > #P newex 396 107 93 9109513 jit.op @op * @val 2.; > #P newex 270 204 55 9109513 jit.multiplex; > #P newex 270 173 92 9109513 jit.matrix 3 float32 1; > #P window linecount 3; > #P newex 270 231 87 9109513 jit.gl.mesh quadr @draw_mode lines > @blend_enable 1; > #P window linecount 2; > #P newex 25 300 130 9109513 jit.gl.gridshape quadr @shape sphere @scale > 0.1 0.1 0.1 ; > #P window linecount 1; > #P newex 399 268 37 9109513 s toVid; > #P newex 25 227 35 9109513 r toVid; > #P newex 376 21 31 9109513 r draz; > #P newex 396 64 63 9109513 speedlim 500; > #P newex 376 42 30 9109513 t b b; > #P newex 376 152 44 9109513 jit.matrix; > #P newex 387 178 162 9109513 jit.slide @slide_up 5. @slide_down 5.; > #P newex 399 224 38 9109513 t b l; > #P newex 399 202 40 9109513 jit.iter; > #P newex 396 85 88 9109513 jit.noise 3 float32 1; > #P newex 8 45 45 9109513 loadbang; > #P message 8 66 81 9109513 texture grid 64 64; > #P message 98 114 29 9109513 reset; > #P window linecount 2; > #P newex 98 133 95 9109513 jit.gl.handle quadr @inherit_transform 1; > #P newex 25 250 225 9109513 jit.gl.gridshape quadr @texture grid @color 1 > 1 1 0.2 @blend_enable 1 @shape cube @scale 0.2 0.5 0.5; > #P toggle 24 88 15 0; > #P window linecount 1; > #P newex 24 109 50 9109513 qmetro 5; > #P newex 53 154 33 9109513 s draz; > #P newex 24 132 71 9109513 t b b erase; > #P newex 24 201 73 9109513 jit.window quadr; > #P newex 24 179 160 9109513 jit.gl.render quadr @camera 0 5 0.01; > #P newex 399 246 96 9109513 pack position 0. 0. 0.; > #P connect 20 0 7 0; > #P connect 37 0 36 0; > #P connect 39 0 37 1; > #P connect 38 0 39 0; > #P fasten 15 0 28 0 392 328 229 328; > #P fasten 15 0 25 1 392 198 320 198; > #P connect 15 0 13 0; > #P connect 35 0 38 0; > #P connect 28 0 35 0; > #P connect 33 0 34 0; > #P connect 32 0 29 0; > #P fasten 32 1 30 0 474 517 507 517; > #P fasten 32 2 31 0 489 515 557 515; > #P connect 13 0 14 0; > #P fasten 27 0 16 0 401 149 381 149; > #P connect 26 0 27 0; > #P connect 12 0 26 0; > #P connect 14 1 0 1; > #P connect 18 0 12 0; > #P connect 17 1 18 0; > #P fasten 0 0 21 0 404 266 404 266; > #P connect 14 0 0 0; > #P fasten 17 0 24 0 381 126 275 126; > #P connect 17 0 16 0; > #P connect 19 0 17 0; > #P connect 25 0 23 0; > #P connect 24 0 25 0; > #P connect 9 0 8 0; > #P connect 3 1 4 0; > #P fasten 8 0 1 0 103 177 29 177; > #P connect 3 0 1 0; > #P fasten 3 2 1 0 89 175 29 175; > #P fasten 10 0 1 0 13 167 29 167; > #P connect 5 0 3 0; > #P connect 6 0 5 0; > #P connect 11 0 6 0; > #P connect 11 0 10 0; > #P connect 16 0 15 0; > #P window clipboard copycount 40; > > > On 9/30/07, Wesley Smith wrote: > > > > On 9/30/07, yair reshef wrote: > > > this is better, but its 2d, how do i convert Cartesian to polar in > > 3d?(!) > > > > http://local.wasp.uwa.edu.au/~pbourke/geometry/coords/ > > > > > > wes > > > >
    • Sep 30 2007 | 6:53 pm
      What are you after, Euler angles or "3D polar coordinates" which are called Spherical coordinates?
      wes
    • Sep 30 2007 | 7:06 pm
      basically i am after rotating a number of planes around a center. keeping them looking in the same direction. if i need math to do it, so be it. i would now lke to apply this to the formulas supplied by andrew b. in my shatter experiments, were i cannot use the rotatexyz (which is Euler if im not wrong).
      here is an example of the effect with jit.gl.multiple
      On 9/30/07, Wesley Smith wrote: > > What are you after, Euler angles or "3D polar coordinates" which are > called Spherical coordinates? > > wes >
    • Sep 30 2007 | 7:21 pm
      Euler angles don't give you a unique orientation. Sometimes the result can be ambiguous. For unambigues 3D orientations, you have to use either axis-angle or quaternions.
      That said, given a location and vector direction (velocity for instance), you can derive an axis angle orientation. You take the vector from the point you want to face to yor location. This forms a triangle with your vector orientation. You then normalize both of those vectors. Next, make a vector halfway between them by subtracting one form the other and dividing in half. This will be your axis. To find the angle, take the arcsine of the distance from your orientation to your halfvector. I forget if you have to multiply by 2 here or not, but that is the basic procedure.
      wes
      On 9/30/07, yair reshef wrote: > basically i am after rotating a number of planes around a center. keeping > them looking in the same direction. if i need math to do it, so be it. > i would now lke to apply this to the formulas supplied by andrew b. in my > shatter experiments, were i cannot use the rotatexyz (which is Euler if im > not wrong). > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P newex 50 113 469 9109513 jit.expr @expr in[0] > "in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])" > "in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])" in[0] in[0]; > #P newex 50 91 469 9109513 jit.expr @expr > "in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])" in[0] > "in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])" in[0] in[0]; > #P newex 50 69 480 9109513 jit.expr @expr "in[0].p[0]*cos(in[1]) - > in[0].p[1]*sin(in[1])" "in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])" in[0] > in[0] in[0]; > #P connect 1 0 2 0; > #P connect 0 0 1 0; > #P window clipboard copycount 3; > > here is an example of the effect with jit.gl.multiple > > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P message 440 55 18 9109513 22; > #N vpatcher 15 55 184 207; > #P outlet 67 100 15 0; > #P window setfont "Sans Serif" 9.; > #P message 67 75 68 9109513 fullscreen $1; > #P toggle 50 75 15 0; > #P newex 92 50 35 9109513 sel 27; > #P newex 50 50 40 9109513 key; > #P fasten 1 0 2 0 97 72 55 72; > #P fasten 2 0 3 0 66 90 66 75; > #P connect 3 0 4 0; > #P fasten 0 0 1 0 91 67 91 52; > #P pop; > #P newobj 0 184 25 9109513 p fs; > #P number 441 76 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; > #P message 441 96 36 9109513 dim $1; > #N vpatcher 15 55 209 203; > #P button 4 53 15 0; > #P inlet 3 26 15 0; > #P window setfont "Sans Serif" 9.; > #P window linecount 1; > #P newex 50 29 45 9109513 loadbang; > #P message 50 50 109 9109513 setall 0.2 0.2 0.05 , bang; > #P newex 50 73 92 9109513 jit.matrix 3 float32 3; > #P outlet 50 97 15 0; > #P connect 4 0 5 0; > #P connect 3 0 2 0; > #P connect 5 0 2 0; > #P connect 2 0 1 0; > #P connect 4 0 1 0; > #P connect 1 0 0 0; > #P pop 1; > #P newobj 577 273 38 9109513 p scale; > #P button 167 342 15 0; > #P newex 185 314 402 9109513 jit.gl.multiple quadr 3 @targetname fatPlane > @glparams position rotatexyz scale @texture grid; > #B color 5; > #P newex 326 273 135 9109513 jit.expr @expr in[0]*(57.29578); > #P window linecount 2; > #P newex 326 236 277 9109513 jit.expr @expr 0. > "atan(sqrt((pow(in[0].p[0]\,2)+pow(in[0].p[1]\,2))) / > in[0].p[2])" "atan2(in[0].p[1] \, in[0].p[0])"; > #P window linecount 1; > #P newex 327 153 97 9109513 jit.op @op - @val 1.5; > #P newex 327 132 93 9109513 jit.op @op * @val 3.; > #P newex 201 229 55 9109513 jit.multiplex; > #P newex 201 198 92 9109513 jit.matrix 3 float32 3; > #P window linecount 3; > #P newex 201 256 87 9109513 jit.gl.mesh quadr @draw_mode lines @blend_enable > 1; > #P window linecount 1; > #P newex 307 46 31 9109513 r draz; > #P newex 327 89 68 9109513 speedlim 1500; > #P newex 307 67 30 9109513 t b b; > #P newex 307 177 44 9109513 jit.matrix; > #P newex 307 203 172 9109513 jit.slide @slide_up 15. @slide_down 15.; > #P newex 327 110 88 9109513 jit.noise 3 float32 3; > #P newex 13 28 45 9109513 loadbang; > #B color 4; > #P message 13 49 81 9109513 texture grid 64 64; > #P message 103 97 29 9109513 reset; > #P window linecount 2; > #P newex 103 116 95 9109513 jit.gl.handle quadr @inherit_transform 1; > #P newex 185 339 273 9109513 jit.gl.gridshape quadr @texture grid @color 1 1 > 1 0.2 @blend_enable 1 @shape cube @name fatPlane @automatic 0; > #P toggle 29 71 15 0; > #P window linecount 1; > #P newex 29 92 50 9109513 qmetro 5; > #P newex 58 137 33 9109513 s draz; > #P newex 29 115 71 9109513 t b b erase; > #P newex 29 184 124 9109513 jit.window quadr @floating 1; > #P newex 29 162 147 9109513 jit.gl.render quadr @camera 0 0 5; > #P comment 463 273 82 9109513 radians 2 degrees; > #P window linecount 2; > #P newex 13 230 130 9109513 jit.gl.gridshape quadr @shape sphere @scale 0.1 > 0.1 0.1; > #P connect 28 0 26 2; > #P connect 29 0 20 0; > #P connect 29 0 13 0; > #P connect 29 0 28 0; > #P connect 30 0 29 0; > #P connect 32 0 30 0; > #P connect 12 0 11 0; > #P connect 12 0 7 0; > #P fasten 12 0 32 0 18 51 445 51; > #P fasten 25 0 26 1 331 308 386 308; > #P connect 22 0 23 0; > #P connect 13 0 22 0; > #P connect 17 0 13 0; > #P connect 16 1 17 0; > #P connect 24 0 25 0; > #P fasten 14 0 26 0 312 308 190 308; > #P fasten 14 0 21 1 312 223 251 223; > #P fasten 14 0 24 0 312 229 331 229; > #P connect 15 0 14 0; > #P fasten 23 0 15 0 332 174 312 174; > #P fasten 16 0 20 0 312 151 206 151; > #P connect 16 0 15 0; > #P connect 18 0 16 0; > #P connect 21 0 19 0; > #P connect 20 0 21 0; > #P connect 27 0 8 0; > #P connect 10 0 9 0; > #P connect 4 1 5 0; > #P connect 31 0 3 0; > #P fasten 11 0 2 0 18 150 34 150; > #P fasten 4 2 2 0 94 158 34 158; > #P connect 4 0 2 0; > #P fasten 9 0 2 0 108 160 34 160; > #P connect 6 0 4 0; > #P connect 7 0 6 0; > #P window clipboard copycount 33; > > > On 9/30/07, Wesley Smith wrote: > > > > What are you after, Euler angles or "3D polar coordinates" which are > > called Spherical coordinates? > > > > wes > > > > > >
    • Sep 30 2007 | 8:18 pm
      thank you wes, much appreciated
      On 9/30/07, Wesley Smith wrote: > > Euler angles don't give you a unique orientation. Sometimes the > result can be ambiguous. For unambigues 3D orientations, you have to > use either axis-angle or quaternions. > > That said, given a location and vector direction (velocity for > instance), you can derive an axis angle orientation. You take the > vector from the point you want to face to yor location. This forms a > triangle with your vector orientation. You then normalize both of > those vectors. Next, make a vector halfway between them by > subtracting one form the other and dividing in half. This will be > your axis. To find the angle, take the arcsine of the distance from > your orientation to your halfvector. I forget if you have to multiply > by 2 here or not, but that is the basic procedure. > > wes > > > > On 9/30/07, yair reshef wrote: > > basically i am after rotating a number of planes around a center. > keeping > > them looking in the same direction. if i need math to do it, so be it. > > i would now lke to apply this to the formulas supplied by andrew b. in > my > > shatter experiments, were i cannot use the rotatexyz (which is Euler if > im > > not wrong). > > > > #P window setfont "Sans Serif" 9.; > > #P window linecount 1; > > #P newex 50 113 469 9109513 jit.expr @expr in[0] > > "in[0].p[1]*cos(in[1])-in[0].p[2]*sin(in[1])" > > "in[0].p[2]*cos(in[1])+in[0].p[1]*sin(in[1])" in[0] in[0]; > > #P newex 50 91 469 9109513 jit.expr @expr > > "in[0].p[0]*cos(in[1])+in[0].p[2]*sin(in[1])" in[0] > > "in[0].p[2]*cos(in[1])-in[0].p[0]*sin(in[1])" in[0] in[0]; > > #P newex 50 69 480 9109513 jit.expr @expr "in[0].p[0]*cos(in[1]) - > > in[0].p[1]*sin(in[1])" "in[0].p[1]*cos(in[1]) + in[0].p[0]*sin(in[1])" > in[0] > > in[0] in[0]; > > #P connect 1 0 2 0; > > #P connect 0 0 1 0; > > #P window clipboard copycount 3; > > > > here is an example of the effect with jit.gl.multiple > > > > #P window setfont "Sans Serif" 9.; > > #P window linecount 1; > > #P message 440 55 18 9109513 22; > > #N vpatcher 15 55 184 207; > > #P outlet 67 100 15 0; > > #P window setfont "Sans Serif" 9.; > > #P message 67 75 68 9109513 fullscreen $1; > > #P toggle 50 75 15 0; > > #P newex 92 50 35 9109513 sel 27; > > #P newex 50 50 40 9109513 key; > > #P fasten 1 0 2 0 97 72 55 72; > > #P fasten 2 0 3 0 66 90 66 75; > > #P connect 3 0 4 0; > > #P fasten 0 0 1 0 91 67 91 52; > > #P pop; > > #P newobj 0 184 25 9109513 p fs; > > #P number 441 76 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0; > > #P message 441 96 36 9109513 dim $1; > > #N vpatcher 15 55 209 203; > > #P button 4 53 15 0; > > #P inlet 3 26 15 0; > > #P window setfont "Sans Serif" 9.; > > #P window linecount 1; > > #P newex 50 29 45 9109513 loadbang; > > #P message 50 50 109 9109513 setall 0.2 0.2 0.05 , bang; > > #P newex 50 73 92 9109513 jit.matrix 3 float32 3; > > #P outlet 50 97 15 0; > > #P connect 4 0 5 0; > > #P connect 3 0 2 0; > > #P connect 5 0 2 0; > > #P connect 2 0 1 0; > > #P connect 4 0 1 0; > > #P connect 1 0 0 0; > > #P pop 1; > > #P newobj 577 273 38 9109513 p scale; > > #P button 167 342 15 0; > > #P newex 185 314 402 9109513 jit.gl.multiple quadr 3 @targetname > fatPlane > > @glparams position rotatexyz scale @texture grid; > > #B color 5; > > #P newex 326 273 135 9109513 jit.expr @expr in[0]*(57.29578); > > #P window linecount 2; > > #P newex 326 236 277 9109513 jit.expr @expr 0. > > "atan(sqrt((pow(in[0].p[0]\,2)+pow(in[0].p[1]\,2))) / > > in[0].p[2])" "atan2(in[0].p[1] \, in[0].p[0])"; > > #P window linecount 1; > > #P newex 327 153 97 9109513 jit.op @op - @val 1.5; > > #P newex 327 132 93 9109513 jit.op @op * @val 3.; > > #P newex 201 229 55 9109513 jit.multiplex; > > #P newex 201 198 92 9109513 jit.matrix 3 float32 3; > > #P window linecount 3; > > #P newex 201 256 87 9109513 jit.gl.mesh quadr @draw_mode lines > @blend_enable > > 1; > > #P window linecount 1; > > #P newex 307 46 31 9109513 r draz; > > #P newex 327 89 68 9109513 speedlim 1500; > > #P newex 307 67 30 9109513 t b b; > > #P newex 307 177 44 9109513 jit.matrix; > > #P newex 307 203 172 9109513 jit.slide @slide_up 15. @slide_down 15.; > > #P newex 327 110 88 9109513 jit.noise 3 float32 3; > > #P newex 13 28 45 9109513 loadbang; > > #B color 4; > > #P message 13 49 81 9109513 texture grid 64 64; > > #P message 103 97 29 9109513 reset; > > #P window linecount 2; > > #P newex 103 116 95 9109513 jit.gl.handle quadr @inherit_transform 1; > > #P newex 185 339 273 9109513 jit.gl.gridshape quadr @texture grid @color > 1 1 > > 1 0.2 @blend_enable 1 @shape cube @name fatPlane @automatic 0; > > #P toggle 29 71 15 0; > > #P window linecount 1; > > #P newex 29 92 50 9109513 qmetro 5; > > #P newex 58 137 33 9109513 s draz; > > #P newex 29 115 71 9109513 t b b erase; > > #P newex 29 184 124 9109513 jit.window quadr @floating 1; > > #P newex 29 162 147 9109513 jit.gl.render quadr @camera 0 0 5; > > #P comment 463 273 82 9109513 radians 2 degrees; > > #P window linecount 2; > > #P newex 13 230 130 9109513 jit.gl.gridshape quadr @shape sphere @scale > 0.1 > > 0.1 0.1; > > #P connect 28 0 26 2; > > #P connect 29 0 20 0; > > #P connect 29 0 13 0; > > #P connect 29 0 28 0; > > #P connect 30 0 29 0; > > #P connect 32 0 30 0; > > #P connect 12 0 11 0; > > #P connect 12 0 7 0; > > #P fasten 12 0 32 0 18 51 445 51; > > #P fasten 25 0 26 1 331 308 386 308; > > #P connect 22 0 23 0; > > #P connect 13 0 22 0; > > #P connect 17 0 13 0; > > #P connect 16 1 17 0; > > #P connect 24 0 25 0; > > #P fasten 14 0 26 0 312 308 190 308; > > #P fasten 14 0 21 1 312 223 251 223; > > #P fasten 14 0 24 0 312 229 331 229; > > #P connect 15 0 14 0; > > #P fasten 23 0 15 0 332 174 312 174; > > #P fasten 16 0 20 0 312 151 206 151; > > #P connect 16 0 15 0; > > #P connect 18 0 16 0; > > #P connect 21 0 19 0; > > #P connect 20 0 21 0; > > #P connect 27 0 8 0; > > #P connect 10 0 9 0; > > #P connect 4 1 5 0; > > #P connect 31 0 3 0; > > #P fasten 11 0 2 0 18 150 34 150; > > #P fasten 4 2 2 0 94 158 34 158; > > #P connect 4 0 2 0; > > #P fasten 9 0 2 0 108 160 34 160; > > #P connect 6 0 4 0; > > #P connect 7 0 6 0; > > #P window clipboard copycount 33; > > > > > > On 9/30/07, Wesley Smith wrote: > > > > > > What are you after, Euler angles or "3D polar coordinates" which are > > > called Spherical coordinates? > > > > > > wes > > > > > > > > > > > >
    • Feb 06 2008 | 8:13 pm
      This is an old thread - but in case anyone's interested, here's a solution that keeps the gridshapes perpetually oriented to the world origin.
      Zachary