ࡱ> Root Entryp|YrRASHKȥ@Contents0Page 12 Symbol 4@ !3456789:;<=>?@ARoot Entryp|YrRASH@l&@Contents$0Page 13Symbol 4@ "#%&'()*+,-.Symbol 1CPicPage CPicLayer CPicFramezU:3OFNF000NF?) bg3CPicText  hooge 05_58 (juicebox 3d with vector texture?#H txtO CPicSprite dgscene? sceneOO?l=_quality = "HIGH"; fscommand("allowscale",0); Model3d = function () { var pts = this.pts = [ { x: 0.000003 ,y: -12.000000 ,z: 0.00000 }, { x: 0.000002 ,y: -8.000000 ,z: 3.500000 }, { x: 0.000002 ,y: -8.000000 ,z: -3.500000 }, { x: 0.000003 ,y: -10.500000 ,z: 0.000001 }, { x: -3.499997 ,y: -12.000001 ,z: 0.000001 }, { x: 3.500003 ,y: -11.999999 ,z: 0.000001 }, { x: -3.499998 ,y: -10.500001 ,z: 0.000001 }, { x: 3.500002 ,y: -10.499999 ,z: 0.000001 }, { x: 3.500002 ,y: -7.999999 ,z: -3.500000 }, { x: 3.500002 ,y: -7.999999 ,z: 3.500000 }, { x: -3.499998 ,y: -8.000001 ,z: -3.500000 }, { x: -3.499998 ,y: -8.000001 ,z: 3.500000 }, { x: 3.499997 ,y: 12.000001 ,z: -3.500001 }, { x: 3.499997 ,y: 12.000001 ,z: 3.499999 }, { x: -3.500003 ,y: 11.999999 ,z: -3.500001 }, { x: -3.500003 ,y: 11.999999 ,z: 3.499999 }, { x: -3.6 ,y: -3.204776 ,z: 1.804606 }, { x: -3.6 ,y: -1.107400 ,z: 1.804606 }, { x: -3.6 ,y: -1.107400 ,z: -1.688395 }, { x: -3.6 ,y: -3.204776 ,z: -1.688395 }, { x: -3.6 ,y: -3.204776 ,z: -0.989270 }, { x: -3.6 ,y: -1.806526 ,z: -0.989270 }, { x: -3.6 ,y: -1.806526 ,z: -0.290145 }, { x: -3.6 ,y: -2.505651 ,z: -0.290145 }, { x: -3.6 ,y: -2.505651 ,z: 0.408980 }, { x: -3.6 ,y: -1.806526 ,z: 0.408980 }, { x: -3.6 ,y: -1.806526 ,z: 1.108106 }, { x: -3.6 ,y: -3.204776 ,z: 1.108106 }, { x: -3.6 ,y: -0.404775 ,z: 1.804606 }, { x: -3.6 ,y: 1.692600 ,z: 1.804606 }, { x: -3.6 ,y: 1.692600 ,z: -1.688395 }, { x: -3.6 ,y: -0.404775 ,z: -1.688395 }, { x: -3.6 ,y: -0.404775 ,z: -0.989270 }, { x: -3.6 ,y: 0.993475 ,z: -0.989270 }, { x: -3.6 ,y: 0.993475 ,z: 1.108106 }, { x: -3.6 ,y: -0.404775 ,z: 1.108106 }, { x: -3.6 ,y: 3.092601 ,z: -1.688395 }, { x: -3.6 ,y: 2.393476 ,z: -1.688395 }, { x: -3.6 ,y: 2.393476 ,z: 1.804606 }, { x: -3.6 ,y: 3.092601 ,z: 1.804606 }, { x: -3.6 ,y: 4.494351 ,z: -0.989270 }, { x: -3.6 ,y: 5.193477 ,z: -0.989270 }, { x: -3.6 ,y: 5.193477 ,z: 1.804606 }, { x: -3.6 ,y: 5.892602 ,z: 1.804606 }, { x: -3.6 ,y: 5.892602 ,z: -1.688395 }, { x: -3.6 ,y: 3.795226 ,z: -1.688395 }, { x: -3.6 ,y: 3.795226 ,z: 1.804606 }, { x: -3.6 ,y: 4.494351 ,z: 1.804606 }, { x: -3.6 ,y: 7.294352 ,z: -0.989270 }, { x: -3.6 ,y: 8.692602 ,z: -0.989270 }, { x: -3.6 ,y: 8.692602 ,z: -1.688395 }, { x: -3.6 ,y: 6.595227 ,z: -1.688395 }, { x: -3.6 ,y: 6.595227 ,z: 1.804606 }, { x: -3.6 ,y: 7.294352 ,z: 1.804606 } ]; var planes = this.planes = [ // V // [3,6,11],[3,11,1],[7,3,9],[3,1,9], [3,7,8],[3,8,2],[6,3,10],[3,2,10], // V inner // [3,9,8],[3,10,11],[3,7,9],[7,3,8], [3,6,10],[6,3,11], // box // [8,9,13,12],[10,8,12,14],[11,10,14,15],[9,11,15,13],[12,13,15,14], // edge // [0,5,7],[0,7,3],[6,4,0],[6,0,3],[0,4,6],[0,6,3],[7,5,0],[7,0,3], [53,52,51,50,49,48], [47,46,45,44,43,42,41,40], [39,38,37,36], [28,29,30,31,32,33,34,35], [27,26,25,24,23,22,21,20,19,18,17,16] ]; } Model3d.prototype.render = function ( mc , ax , ay ) { mc.clear (); //mc.lineStyle ( 0 ) var sin = Math.sin, cos = Math.cos; var sinax = sin ( ax ); var cosax = cos ( ax ); var sinay = sin ( ay ); var cosay = cos ( ay ); var tx , ty , tz , p; var pts = this.pts; for ( p in pts ) { var pt = pts[p]; var x = pt.x; var y = pt.y; var z = pt.z; tx = x * cosay + z * sinay; tz = z * cosay - x * sinay; x = tx; z = tz; ty = y * cosax - z * sinax; tz = y * sinax + z * cosax; y = ty; z = tz; pt.rx = x; pt.ry = y; pt.rz = z; var pers = 300 / ( z + 33 ); pt.sx = x * pers; pt.sy = y * pers; //mc.attachMovie ( "pt" , "pt" + p , p , { _x: pt.sx , _y: pt.sy, id: p } ); } // depth - buffer // // fastes algorithm // var zSort = []; var planes = this.planes; for ( var p = 0 ; p < 27 ; p++ ) { var plane = planes[p]; var mz = 0,mx = 0,my = 0; for ( var pi in plane ) { mx += pts[ plane[ pi ] ].rx; my += pts[ plane[ pi ] ].ry; mz += pts[ plane[ pi ] ].rz - 33; } var len = plane.length; mx /= len; my /= len; mz /= len; zSort[ zSort.length ] = { id: p, d: 10000000 - int ( Math.sqrt ( mz * mz + my * my + mx * mx ) * 100000 ) }; } zSort.sortOn ( "d" ); for ( var p = 27 ; p < planes.length ; p++ ) { zSort.unshift ( { id: p } ); } for ( p in planes ) { var id = Number ( zSort[p].id ); var plane = planes[ id ]; var p0 = pts[ plane[ 0 ] ]; var p1 = pts[ plane[ 1 ] ]; var p2 = pts[ plane[ 2 ] ]; var p3 = pts[ plane[ 3 ] ]; var p0x = p0.sx, p0y = p0.sy; var p1x = p1.sx, p1y = p1.sy; var p2x = p2.sx, p2y = p2.sy; var p3x = p3.sx, p3y = p3.sy; var z = ( p1x - p0x ) * ( p2y - p0y ) - ( p1y - p0y ) * ( p2x - p0x ); if ( id > 29 ) z = -z; if ( z > 0 ) { var d01y = p0.ry - p1.ry; var d12z = p1.rz - p2.rz; var d01z = p0.rz - p1.rz; var d12y = p1.ry - p2.ry; var d12x = p1.rx - p2.rx; var d01x = p0.rx - p1.rx ; var nx = d01y * d12z - d01z * d12y; var ny = d01z * d12x - d01x * d12z; var nz = d01x * d12y - d01y * d12x; var nLen = Math.sqrt ( nx * nx + ny * ny + nz * nz ); if ( id > 29 ) nz = -nz; var colFac = Math.acos( -nz / nLen ) / Math.PI; // colours // if ( id > 26 ) { // font var r = 255, g = 140, b = 0; } else if ( id > 18 ) { // edge var r = 245, g = 245, b = 245; } else if ( id > 13 ) { // box var r = 255, g = 227, b = 21; } else if ( id > 9 ) { // V inner_darker var r = 215, g = 224, b = 14; } else if ( id > 7 ) { // V inner var r = 254, g = 223, b = 12; } else { // V var r = 254, g = 233, b = 86; } with ( mc ) { var col = colFac * r << 16 | colFac *Symbol 1CPicPage CPicLayer CPicFrame?f Ebene 1OCPicPage CPicLayer CPicFramePPPP? Ebene 1O = 254, g = 233, b = 86; } with ( mc ) { var col = colFac * r << 16 | colFac * g << 8 | colFac * b; beginFill ( col ); moveTo ( p0x , p0y ); lineTo ( p1x , p1y ); lineTo ( p2x , p2y ); if ( plane.length > 3 ) { for ( var pc = 3 ; pc < plane.length ; pc++ ) lineTo ( pts[ plane[pc] ].sx , pts[ plane[pc] ].sy ); } lineTo ( p0x , p0y ); endFill (); } } } } XJ = new Model3d (); ) CDocumentPagePage 1Szene 1 = =Symbol 4pt?y=_ptSymbol 4Z=Symbol 1scene = Symbol 1 =(#(#hhhhf2Vector::External Font Files0Vector::Debugging Permitted0Vector::Generator CommandVector::Compress Movie1Vector::Preview as GIF0Vector::Override Sounds0Vector::Template0Vector::Quality50Vector::Protect0Vector::Debugging PasswordVector::Omit Trace Actions0Vector::TopDown0Vector::Report0Vector::Event Format0Vector::Stream Compress7Vector::Version6Vector::Event Compress7Vector::Stream Format0 CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3fxf`zf*] g << 8 | colFac * b; beginFill ( col ); moveTo ( p0x , p0y ); lineTo ( p1x , p1y ); lineTo ( p2x , p2y ); if ( plane.length > 3 ) { for ( var pc = 3 ; pc < plane.length ; pc++ ) lineTo ( pts[ plane[pc] ].sx , pts[ plane[pc] ].sy ); } lineTo ( p0x , p0y ); endFill (); } } } } JB = new Model3d (); this.onEnterFrame = function () { JB.render ( scene , b += scene._ymouse/1500 , a += scene._xmouse / 1500 ); }  codeO txtO CPicSprite dg!scene? sceneOO?y_quality) CDocumentPagePage 1Szene 1 = %?Symbol 4pt?y=_ptSymbol 4Z=Symbol 1scene = Symbol 1 =(#(#hhhhf2Vector::Debugging Permitted0Vector::External Font Files0Vector::Generator CommandVector::Compress Movie1Vector::Preview as GIF0Vector::Override Sounds0Vector::Protect0Vector::Quality50Vector::Template0Vector::Omit Trace Actions0Vector::Debugging PasswordVector::TopDown0Vector::Report0Vector::Version6Vector::Stream Compress7Vector::Event Format0Vector::Event Compress7Vector::Stream Format0 CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3fxf`zf*]ar d01x = p0.rx - p1.rx ; var nx = d01y * d12z - d01z * d12y; var ny = d01z * d12x - d01x * d12z; var nz = d01x * d12y - d01y * d12x; var nLen = Math.sqrt ( nx * nx + ny * ny + nz * nz ); i