This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ====== Hands on tropical geometry ====== This is a minimal tutorial for 3d-printing tropical surfaces and tropical curves. The resulting digital models can also be used for high quality renders. For questions on or beyond the tutorial, visit the polymake forums: https://forum.polymake.org/ ===== Basic preperations for this notebook ===== <html><font color='red'></html>//This code cell should run before any of the others//<html></font></html> <code perl> > script("files/3d_printing_with_x3d/3d_printing_helping_subs.pl"); # loading helper scripts > # needs to be done before > application "tropical"; > > $x3d_dir="/tmp/x3ds/"; # designated folder for x3d files (leave empty for current folder) > if (!-d $x3d_dir) { mkdir $x3d_dir; } # create the folder if it does not exist </code> ===== Tropical surfaces ===== ==== A: creating tropical surfaces in polymake ==== A tropical surface in euclidean 3-space is also a tropical hypersurface, and the simplest way to create a tropical hypersurface is by specifying a tropical polynomial which cuts it out. This can be done through a suitable string. Note that **the polynomial needs to be homogeneous** and that the first coordinate will be set to 1 for the affine picture. To control which variable comes first, one can supplement an array of variable names. <code perl> > $quadric = toTropicalPolynomial("min(1+2*w, 1+2*x, 1+2*y, 1+2*z, w+x, w+y, w+z, x+y, x+z, y+z)", qw( w x y z )); > $TQuadric = new Hypersurface<Min>(POLYNOMIAL=>$quadric); > $TQuadric->VISUAL; </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:21 2022 TQuadric --> <html> <head> <meta charset=utf-8> <title>TQuadric</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model91000446034 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_0' class='settings'> <div class=group id='explode_0'> <strong>Explode</strong> <input id='explodeRange_0' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_0' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_0' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_0' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_0' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_0' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_0'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_0'> x-axis</div> <div><input type='checkbox' id='changeRotationY_0'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_0'> z-axis</div> <button id='resetButton_0'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_0' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_0'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_0' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_0' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_0'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_0"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_0'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_0' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_0' > New tab<br> </form> <button id='takeScreenshot_0'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_0' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_0' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model91000446034"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model91000446034"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model91000446034'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(0, 0, 0)); obj0.userData.points.push(new PMPoint(0, -1, 0)); obj0.userData.points.push(new PMPoint(-1, -2, -1)); obj0.userData.points.push(new PMPoint(-2, -2, -2)); obj0.userData.pointradii = 0.002; <!-- Vertex style --> obj0.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj0.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj0.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj0.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj0.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(0, 0, -1)); obj1.userData.points.push(new PMPoint(0, 0, 0)); obj1.userData.points.push(new PMPoint(2, 0, 0)); obj1.userData.points.push(new PMPoint(2, 0, -1)); obj1.userData.pointradii = 0.002; <!-- Vertex style --> obj1.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj1.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj1.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj1.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj1.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(-1, 0, 2)); obj2.userData.points.push(new PMPoint(-1, 0, 0)); obj2.userData.points.push(new PMPoint(-2, -1, -1)); obj2.userData.points.push(new PMPoint(-2, -1, 2)); obj2.userData.pointradii = 0.002; <!-- Vertex style --> obj2.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj2.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj2.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj2.userData.facets = [[1, 0, 3, 2]]; <!-- Facet style --> obj2.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(0, -1, 0)); obj3.userData.points.push(new PMPoint(0, 0, 0)); obj3.userData.points.push(new PMPoint(2, 0, 0)); obj3.userData.points.push(new PMPoint(2, -1, 0)); obj3.userData.pointradii = 0.002; <!-- Vertex style --> obj3.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj3.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj3.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj3.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj3.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(0, -1, 0)); obj4.userData.points.push(new PMPoint(0, 0, 0)); obj4.userData.points.push(new PMPoint(0, 0, 2)); obj4.userData.points.push(new PMPoint(0, -1, 2)); obj4.userData.pointradii = 0.002; <!-- Vertex style --> obj4.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj4.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj4.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj4.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj4.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(0, 0, 0)); obj5.userData.points.push(new PMPoint(1, 1, 1)); obj5.userData.points.push(new PMPoint(2, 0, 0)); obj5.userData.points.push(new PMPoint(2, 1, 1)); obj5.userData.pointradii = 0.002; <!-- Vertex style --> obj5.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj5.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj5.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj5.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj5.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "unnamed__7"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(2, 1, 1)); obj6.userData.points.push(new PMPoint(1, 1, 1)); obj6.userData.points.push(new PMPoint(1, 2, 1)); obj6.userData.points.push(new PMPoint(2, 2, 1)); obj6.userData.pointradii = 0.002; <!-- Vertex style --> obj6.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj6.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj6.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj6.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj6.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "unnamed__8"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(1, 1, 1)); obj7.userData.points.push(new PMPoint(2, 1, 1)); obj7.userData.points.push(new PMPoint(1, 1, 2)); obj7.userData.points.push(new PMPoint(2, 1, 2)); obj7.userData.pointradii = 0.002; <!-- Vertex style --> obj7.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj7.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj7.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj7.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj7.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "unnamed__9"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(0, 0, -1)); obj8.userData.points.push(new PMPoint(0, 0, 0)); obj8.userData.points.push(new PMPoint(-2, -2, -2)); obj8.userData.points.push(new PMPoint(-1, -1, -2)); obj8.userData.pointradii = 0.002; <!-- Vertex style --> obj8.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj8.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj8.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj8.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj8.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "unnamed__10"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(0, 0, 0)); obj9.userData.points.push(new PMPoint(-1, 0, 0)); obj9.userData.points.push(new PMPoint(-2, -1, -1)); obj9.userData.points.push(new PMPoint(-2, -2, -2)); obj9.userData.pointradii = 0.002; <!-- Vertex style --> obj9.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj9.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj9.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj9.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj9.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "unnamed__11"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(0, 0, 0)); obj10.userData.points.push(new PMPoint(0, 0, -1)); obj10.userData.points.push(new PMPoint(0, 2, 0)); obj10.userData.points.push(new PMPoint(0, 2, -1)); obj10.userData.pointradii = 0.002; <!-- Vertex style --> obj10.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj10.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj10.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj10.userData.facets = [[1, 0, 2, 3]]; <!-- Facet style --> obj10.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "unnamed__12"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(-1, 0, 0)); obj11.userData.points.push(new PMPoint(-1, 2, 0)); obj11.userData.points.push(new PMPoint(-2, 2, -1)); obj11.userData.points.push(new PMPoint(-2, -1, -1)); obj11.userData.pointradii = 0.002; <!-- Vertex style --> obj11.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj11.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj11.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj11.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj11.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "unnamed__13"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(0, -1, 0)); obj12.userData.points.push(new PMPoint(2, -1, 0)); obj12.userData.points.push(new PMPoint(2, -2, -1)); obj12.userData.points.push(new PMPoint(-1, -2, -1)); obj12.userData.pointradii = 0.002; <!-- Vertex style --> obj12.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj12.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj12.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj12.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj12.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "unnamed__14"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(0, -1, 0)); obj13.userData.points.push(new PMPoint(0, -1, 2)); obj13.userData.points.push(new PMPoint(-1, -2, 2)); obj13.userData.points.push(new PMPoint(-1, -2, -1)); obj13.userData.pointradii = 0.002; <!-- Vertex style --> obj13.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj13.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj13.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj13.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj13.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "unnamed__15"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(0, -1, 0)); obj14.userData.points.push(new PMPoint(2, -1, 0)); obj14.userData.points.push(new PMPoint(0, -1, 2)); obj14.userData.points.push(new PMPoint(2, -1, 2)); obj14.userData.pointradii = 0.002; <!-- Vertex style --> obj14.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj14.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj14.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj14.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj14.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "unnamed__16"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(2, 0, -1)); obj15.userData.points.push(new PMPoint(0, 0, -1)); obj15.userData.points.push(new PMPoint(-1, -1, -2)); obj15.userData.points.push(new PMPoint(2, -1, -2)); obj15.userData.pointradii = 0.002; <!-- Vertex style --> obj15.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj15.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj15.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj15.userData.facets = [[1, 0, 3, 2]]; <!-- Facet style --> obj15.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "unnamed__17"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(2, 0, -1)); obj16.userData.points.push(new PMPoint(0, 0, -1)); obj16.userData.points.push(new PMPoint(0, 2, -1)); obj16.userData.points.push(new PMPoint(2, 2, -1)); obj16.userData.pointradii = 0.002; <!-- Vertex style --> obj16.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj16.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj16.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj16.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj16.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "unnamed__18"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(0, 0, -1)); obj17.userData.points.push(new PMPoint(0, 2, -1)); obj17.userData.points.push(new PMPoint(-1, -1, -2)); obj17.userData.points.push(new PMPoint(-1, 2, -2)); obj17.userData.pointradii = 0.002; <!-- Vertex style --> obj17.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj17.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj17.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj17.userData.facets = [[0, 1, 3, 2]]; <!-- Facet style --> obj17.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "unnamed__19"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(-1, 0, 0)); obj18.userData.points.push(new PMPoint(0, 0, 0)); obj18.userData.points.push(new PMPoint(0, 0, 2)); obj18.userData.points.push(new PMPoint(-1, 0, 2)); obj18.userData.pointradii = 0.002; <!-- Vertex style --> obj18.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj18.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj18.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj18.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj18.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "unnamed__20"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(1, 1, 1)); obj19.userData.points.push(new PMPoint(0, 0, 0)); obj19.userData.points.push(new PMPoint(0, 2, 0)); obj19.userData.points.push(new PMPoint(1, 2, 1)); obj19.userData.pointradii = 0.002; <!-- Vertex style --> obj19.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj19.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj19.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj19.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj19.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "unnamed__21"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(-1, 2, 0)); obj20.userData.points.push(new PMPoint(-1, 0, 0)); obj20.userData.points.push(new PMPoint(-1, 0, 2)); obj20.userData.points.push(new PMPoint(-1, 2, 2)); obj20.userData.pointradii = 0.002; <!-- Vertex style --> obj20.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj20.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj20.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj20.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj20.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "unnamed__22"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(0, 0, 0)); obj21.userData.points.push(new PMPoint(1, 1, 1)); obj21.userData.points.push(new PMPoint(0, 0, 2)); obj21.userData.points.push(new PMPoint(1, 1, 2)); obj21.userData.pointradii = 0.002; <!-- Vertex style --> obj21.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj21.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj21.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj21.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj21.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "unnamed__23"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(1, 2, 1)); obj22.userData.points.push(new PMPoint(1, 1, 1)); obj22.userData.points.push(new PMPoint(1, 1, 2)); obj22.userData.points.push(new PMPoint(1, 2, 2)); obj22.userData.pointradii = 0.002; <!-- Vertex style --> obj22.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj22.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj22.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj22.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj22.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "unnamed__24"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(0, 0, 0)); obj23.userData.points.push(new PMPoint(-1, 0, 0)); obj23.userData.points.push(new PMPoint(0, 2, 0)); obj23.userData.points.push(new PMPoint(-1, 2, 0)); obj23.userData.pointradii = 0.002; <!-- Vertex style --> obj23.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj23.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj23.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj23.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj23.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj23); scene.add(obj23); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_0'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_0').style.visibility = 'visible'; document.getElementById('showSettingsButton_0').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_0').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_0').style.visibility = 'hidden'; document.getElementById('showSettingsButton_0').style.visibility = 'visible'; document.getElementById('hideSettingsButton_0').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_0'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_0'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_0').oninput = triggerExplode; document.getElementById('explodeCheckbox_0').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_0').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_0').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_0').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_0'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_0'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_0').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_0').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_0').onchange = toggleDepthWrite; document.getElementById('changeRotationX_0').onchange = changeRotationX; document.getElementById('changeRotationY_0').onchange = changeRotationY; document.getElementById('changeRotationZ_0').onchange = changeRotationZ; document.getElementById('resetButton_0').onclick = resetScene; document.getElementById('rotationSpeedRange_0').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_0').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_0').onclick = showSettings; document.getElementById('hideSettingsButton_0').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_0').dispatchEvent(event); } else { document.getElementById('showSettingsButton_0').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> Alternatively, one can specify the polynomial through an exponent matrix and a coefficient vector. <code perl> > $mQuadric = [ [2,0,0,0], [0,2,0,0], [0,0,2,0], [0,0,0,2], > [1,1,0,0], [1,0,1,0], [1,0,0,1], > [0,1,1,0], [0,1,0,1], [0,0,1,1]]; > $cQuadric = [1,1,1,1,0,0,0,0,0,0]; > $TQuadric = new Hypersurface<Min>(MONOMIALS=>$mQuadric, COEFFICIENTS=>$cQuadric); > $TQuadric->VISUAL; </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:21 2022 TQuadric --> <html> <head> <meta charset=utf-8> <title>TQuadric</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model59743736595 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_1' class='settings'> <div class=group id='explode_1'> <strong>Explode</strong> <input id='explodeRange_1' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_1' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_1' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_1' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_1' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_1' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_1'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_1'> x-axis</div> <div><input type='checkbox' id='changeRotationY_1'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_1'> z-axis</div> <button id='resetButton_1'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_1' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_1'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_1' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_1' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_1'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_1"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_1'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_1' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_1' > New tab<br> </form> <button id='takeScreenshot_1'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_1' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_1' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model59743736595"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model59743736595"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model59743736595'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(1, 2, 1)); obj0.userData.points.push(new PMPoint(1, 1, 1)); obj0.userData.points.push(new PMPoint(1, 1, 2)); obj0.userData.points.push(new PMPoint(1, 2, 2)); obj0.userData.pointradii = 0.002; <!-- Vertex style --> obj0.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj0.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj0.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj0.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj0.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(-1, 2, 0)); obj1.userData.points.push(new PMPoint(-1, 0, 0)); obj1.userData.points.push(new PMPoint(-1, 0, 2)); obj1.userData.points.push(new PMPoint(-1, 2, 2)); obj1.userData.pointradii = 0.002; <!-- Vertex style --> obj1.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj1.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj1.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj1.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj1.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(1, 1, 1)); obj2.userData.points.push(new PMPoint(2, 1, 1)); obj2.userData.points.push(new PMPoint(1, 1, 2)); obj2.userData.points.push(new PMPoint(2, 1, 2)); obj2.userData.pointradii = 0.002; <!-- Vertex style --> obj2.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj2.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj2.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj2.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj2.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(0, -1, 0)); obj3.userData.points.push(new PMPoint(2, -1, 0)); obj3.userData.points.push(new PMPoint(0, -1, 2)); obj3.userData.points.push(new PMPoint(2, -1, 2)); obj3.userData.pointradii = 0.002; <!-- Vertex style --> obj3.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj3.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj3.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj3.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj3.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(0, 0, 0)); obj4.userData.points.push(new PMPoint(1, 1, 1)); obj4.userData.points.push(new PMPoint(0, 0, 2)); obj4.userData.points.push(new PMPoint(1, 1, 2)); obj4.userData.pointradii = 0.002; <!-- Vertex style --> obj4.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj4.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj4.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj4.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj4.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(2, 1, 1)); obj5.userData.points.push(new PMPoint(1, 1, 1)); obj5.userData.points.push(new PMPoint(1, 2, 1)); obj5.userData.points.push(new PMPoint(2, 2, 1)); obj5.userData.pointradii = 0.002; <!-- Vertex style --> obj5.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj5.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj5.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj5.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj5.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "unnamed__7"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(2, 0, -1)); obj6.userData.points.push(new PMPoint(0, 0, -1)); obj6.userData.points.push(new PMPoint(0, 2, -1)); obj6.userData.points.push(new PMPoint(2, 2, -1)); obj6.userData.pointradii = 0.002; <!-- Vertex style --> obj6.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj6.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj6.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj6.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj6.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "unnamed__8"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(1, 1, 1)); obj7.userData.points.push(new PMPoint(0, 0, 0)); obj7.userData.points.push(new PMPoint(0, 2, 0)); obj7.userData.points.push(new PMPoint(1, 2, 1)); obj7.userData.pointradii = 0.002; <!-- Vertex style --> obj7.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj7.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj7.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj7.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj7.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "unnamed__9"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(0, 0, 0)); obj8.userData.points.push(new PMPoint(1, 1, 1)); obj8.userData.points.push(new PMPoint(2, 0, 0)); obj8.userData.points.push(new PMPoint(2, 1, 1)); obj8.userData.pointradii = 0.002; <!-- Vertex style --> obj8.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj8.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj8.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj8.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj8.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "unnamed__10"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(-1, 0, 2)); obj9.userData.points.push(new PMPoint(-1, 0, 0)); obj9.userData.points.push(new PMPoint(-2, -1, -1)); obj9.userData.points.push(new PMPoint(-2, -1, 2)); obj9.userData.pointradii = 0.002; <!-- Vertex style --> obj9.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj9.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj9.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj9.userData.facets = [[1, 0, 3, 2]]; <!-- Facet style --> obj9.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "unnamed__11"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(0, -1, 0)); obj10.userData.points.push(new PMPoint(0, -1, 2)); obj10.userData.points.push(new PMPoint(-1, -2, 2)); obj10.userData.points.push(new PMPoint(-1, -2, -1)); obj10.userData.pointradii = 0.002; <!-- Vertex style --> obj10.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj10.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj10.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj10.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj10.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "unnamed__12"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(-1, 0, 0)); obj11.userData.points.push(new PMPoint(0, 0, 0)); obj11.userData.points.push(new PMPoint(0, 0, 2)); obj11.userData.points.push(new PMPoint(-1, 0, 2)); obj11.userData.pointradii = 0.002; <!-- Vertex style --> obj11.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj11.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj11.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj11.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj11.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "unnamed__13"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(0, -1, 0)); obj12.userData.points.push(new PMPoint(0, 0, 0)); obj12.userData.points.push(new PMPoint(0, 0, 2)); obj12.userData.points.push(new PMPoint(0, -1, 2)); obj12.userData.pointradii = 0.002; <!-- Vertex style --> obj12.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj12.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj12.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj12.userData.facets = [[0, 3, 2, 1]]; <!-- Facet style --> obj12.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "unnamed__14"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(-1, 0, 0)); obj13.userData.points.push(new PMPoint(-1, 2, 0)); obj13.userData.points.push(new PMPoint(-2, 2, -1)); obj13.userData.points.push(new PMPoint(-2, -1, -1)); obj13.userData.pointradii = 0.002; <!-- Vertex style --> obj13.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj13.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj13.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj13.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj13.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "unnamed__15"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(0, 0, -1)); obj14.userData.points.push(new PMPoint(0, 2, -1)); obj14.userData.points.push(new PMPoint(-1, -1, -2)); obj14.userData.points.push(new PMPoint(-1, 2, -2)); obj14.userData.pointradii = 0.002; <!-- Vertex style --> obj14.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj14.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj14.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj14.userData.facets = [[0, 1, 3, 2]]; <!-- Facet style --> obj14.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "unnamed__16"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(0, 0, 0)); obj15.userData.points.push(new PMPoint(-1, 0, 0)); obj15.userData.points.push(new PMPoint(0, 2, 0)); obj15.userData.points.push(new PMPoint(-1, 2, 0)); obj15.userData.pointradii = 0.002; <!-- Vertex style --> obj15.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj15.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj15.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj15.userData.facets = [[0, 2, 3, 1]]; <!-- Facet style --> obj15.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "unnamed__17"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(0, 0, 0)); obj16.userData.points.push(new PMPoint(0, 0, -1)); obj16.userData.points.push(new PMPoint(0, 2, 0)); obj16.userData.points.push(new PMPoint(0, 2, -1)); obj16.userData.pointradii = 0.002; <!-- Vertex style --> obj16.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj16.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3]; <!-- Edge style --> obj16.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj16.userData.facets = [[1, 0, 2, 3]]; <!-- Facet style --> obj16.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "unnamed__18"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(0, 0, 0)); obj17.userData.points.push(new PMPoint(-1, 0, 0)); obj17.userData.points.push(new PMPoint(-2, -1, -1)); obj17.userData.points.push(new PMPoint(-2, -2, -2)); obj17.userData.pointradii = 0.002; <!-- Vertex style --> obj17.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj17.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj17.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj17.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj17.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "unnamed__19"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(0, -1, 0)); obj18.userData.points.push(new PMPoint(2, -1, 0)); obj18.userData.points.push(new PMPoint(2, -2, -1)); obj18.userData.points.push(new PMPoint(-1, -2, -1)); obj18.userData.pointradii = 0.002; <!-- Vertex style --> obj18.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj18.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj18.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj18.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj18.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "unnamed__20"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(2, 0, -1)); obj19.userData.points.push(new PMPoint(0, 0, -1)); obj19.userData.points.push(new PMPoint(-1, -1, -2)); obj19.userData.points.push(new PMPoint(2, -1, -2)); obj19.userData.pointradii = 0.002; <!-- Vertex style --> obj19.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj19.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj19.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj19.userData.facets = [[1, 0, 3, 2]]; <!-- Facet style --> obj19.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "unnamed__21"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(0, -1, 0)); obj20.userData.points.push(new PMPoint(0, 0, 0)); obj20.userData.points.push(new PMPoint(2, 0, 0)); obj20.userData.points.push(new PMPoint(2, -1, 0)); obj20.userData.pointradii = 0.002; <!-- Vertex style --> obj20.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj20.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj20.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj20.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj20.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "unnamed__22"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(0, 0, -1)); obj21.userData.points.push(new PMPoint(0, 0, 0)); obj21.userData.points.push(new PMPoint(2, 0, 0)); obj21.userData.points.push(new PMPoint(2, 0, -1)); obj21.userData.pointradii = 0.002; <!-- Vertex style --> obj21.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj21.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj21.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj21.userData.facets = [[0, 1, 2, 3]]; <!-- Facet style --> obj21.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "unnamed__23"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(0, 0, 0)); obj22.userData.points.push(new PMPoint(0, -1, 0)); obj22.userData.points.push(new PMPoint(-1, -2, -1)); obj22.userData.points.push(new PMPoint(-2, -2, -2)); obj22.userData.pointradii = 0.002; <!-- Vertex style --> obj22.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj22.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj22.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj22.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj22.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "unnamed__24"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(0, 0, -1)); obj23.userData.points.push(new PMPoint(0, 0, 0)); obj23.userData.points.push(new PMPoint(-2, -2, -2)); obj23.userData.points.push(new PMPoint(-1, -1, -2)); obj23.userData.pointradii = 0.002; <!-- Vertex style --> obj23.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj23.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3]; <!-- Edge style --> obj23.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); obj23.userData.facets = [[2, 1, 0, 3]]; <!-- Facet style --> obj23.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj23); scene.add(obj23); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_1'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_1').style.visibility = 'visible'; document.getElementById('showSettingsButton_1').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_1').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_1').style.visibility = 'hidden'; document.getElementById('showSettingsButton_1').style.visibility = 'visible'; document.getElementById('hideSettingsButton_1').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_1'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_1'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_1').oninput = triggerExplode; document.getElementById('explodeCheckbox_1').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_1').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_1').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_1').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_1'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_1'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_1').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_1').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_1').onchange = toggleDepthWrite; document.getElementById('changeRotationX_1').onchange = changeRotationX; document.getElementById('changeRotationY_1').onchange = changeRotationY; document.getElementById('changeRotationZ_1').onchange = changeRotationZ; document.getElementById('resetButton_1').onclick = resetScene; document.getElementById('rotationSpeedRange_1').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_1').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_1').onclick = showSettings; document.getElementById('hideSettingsButton_1').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_1').dispatchEvent(event); } else { document.getElementById('showSettingsButton_1').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> ==== B: exporting tropical surfaces from polymake ==== There are many options one can pass to a VISUAL routine in Polymake in order to customize the look of the exported 3d-model. Some of them are useful for 3d printing, others should rather stay hidden. The most basic configuration is the following, which tells polymake not to visualize the vertices and edges. <code perl> > $surface_opts = {VertexStyle=>'hidden', EdgeStyle=>'hidden'}; > x3d($TQuadric->VISUAL($surface_opts), File=>$x3d_dir."filename.x3d"); </code> One can also explicitely specify the bounding box of the model. This is very useful when creating one model from multiple objects, e.g., a tropical curve on a tropical surface. The first line below creates a bounding box around the vertices of the tropical surface: <code perl> > $bFacets = polytope::bounding_box_facets($TQuadric->affine_chart->VERTICES,offset=>1,surplus_k=>0.4, make_cube=>1); > x3d($TQuadric->VISUAL($surface_opts,BoundingFacets=>$bFacets),File=>$x3d_dir."TQuadric.x3d"); </code> For more options, please see the polymake tutorial on visualization. ==== C: solidifying tropical surfaces ==== All 3d printable models need volume. This can be done by solidifying the surface in Blender and/or Polymake. === Option A: Blender === The following tutorial was made in blender 2.81. - Import the previously exported x3d file of the surface, {{:tutorials:release:4.8:3d_printing_with_x3d:imported_quadric.jpeg|imported_quadric.jpeg}} - Select all layers (click onselect single layer, press 'A') and join them {{:tutorials:release:4.8:3d_printing_with_x3d:joined_quadric.jpeg|joined_quadric.jpeg}} - Select modifier properties {{:tutorials:release:4.8:3d_printing_with_x3d:modifier_properties.jpeg|modifier_properties.jpeg}} - Add a **Solidify** modifier, set //Offset// to 0 and //Thickness// sufficiently large {{:tutorials:release:4.8:3d_printing_with_x3d:solidified_quadric.jpeg|solidified_quadric.jpeg}} - Add a **Bevel** modifier and adjust //Segments//, //Width// (optional)\\ {{:tutorials:release:4.8:3d_printing_with_x3d:beveled_quadric.jpeg|beveled_quadric.jpeg}} === Option B: in polymake === To solidify the surface in polymake, we need to decide on the planned size of the model and the desired cell thickness. A minimal thickness of 2mm is recommended for printing with plastics. <code perl> > $total_mm = 100; #planned size of the model > $surface_mm = 2; #desired cell thickness > > $bFacets = polytope::bounding_box_facets($TQuadric->affine_chart->VERTICES,offset=>1,surplus_k=>0.4, make_cube=>1); > $diam = $bFacets->[0]->[0] + $bFacets->[1]->[0]; > $surface_abs = $surface_mm * $diam/$total_mm; #absolute surface thickness in the x3d file > $solidifiedQuadricCells = solidify_2d_pcom($TQuadric->affine_chart,$surface_abs); > @solidifiedQuadricCellsVis = map { $_->VISUAL($surface_opts,BoundingFacets=>$bFacets) } @$solidifiedQuadricCells; > x3d(compose(@solidifiedQuadricCellsVis),File=>$x3d_dir."TQuadricSolidified.x3d"); > compose(@solidifiedQuadricCellsVis); </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:23 2022 _bounded --> <html> <head> <meta charset=utf-8> <title>_bounded</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model86046858071 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_2' class='settings'> <div class=group id='explode_2'> <strong>Explode</strong> <input id='explodeRange_2' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_2' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_2' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_2' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_2' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_2' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_2'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_2'> x-axis</div> <div><input type='checkbox' id='changeRotationY_2'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_2'> z-axis</div> <button id='resetButton_2'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_2' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_2'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_2' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_2' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_2'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_2"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_2'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_2' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_2' > New tab<br> </form> <button id='takeScreenshot_2'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_2' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_2' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model86046858071"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model86046858071"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model86046858071'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "_bounded"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(1.056, 2.8, 1)); obj0.userData.points.push(new PMPoint(0.944, 2.8, 1)); obj0.userData.points.push(new PMPoint(0.944, 1, 1)); obj0.userData.points.push(new PMPoint(1.056, 1, 1)); obj0.userData.points.push(new PMPoint(0.944, 1, 2.8)); obj0.userData.points.push(new PMPoint(1.056, 1, 2.8)); obj0.userData.points.push(new PMPoint(0.944, 2.8, 2.8)); obj0.userData.points.push(new PMPoint(1.056, 2.8, 2.8)); obj0.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj0.userData.facets = [[5, 3, 0, 7], [1, 2, 4, 6], [2, 3, 5, 4], [0, 3, 2, 1], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj0.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "_bounded"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(-1.056, 2.8, 0)); obj1.userData.points.push(new PMPoint(-0.944, 2.8, 0)); obj1.userData.points.push(new PMPoint(-0.944, 0, 0)); obj1.userData.points.push(new PMPoint(-1.056, 0, 0)); obj1.userData.points.push(new PMPoint(-0.944, 0, 2.8)); obj1.userData.points.push(new PMPoint(-1.056, 0, 2.8)); obj1.userData.points.push(new PMPoint(-0.944, 2.8, 2.8)); obj1.userData.points.push(new PMPoint(-1.056, 2.8, 2.8)); obj1.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj1.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj1.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "_bounded"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(2.8, 1.056, 1)); obj2.userData.points.push(new PMPoint(2.8, 0.944, 1)); obj2.userData.points.push(new PMPoint(1, 0.944, 1)); obj2.userData.points.push(new PMPoint(1, 1.056, 1)); obj2.userData.points.push(new PMPoint(1, 0.944, 2.8)); obj2.userData.points.push(new PMPoint(1, 1.056, 2.8)); obj2.userData.points.push(new PMPoint(2.8, 0.944, 2.8)); obj2.userData.points.push(new PMPoint(2.8, 1.056, 2.8)); obj2.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj2.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [3, 0, 1, 2], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj2.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "_bounded"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(2.8, -1.056, 0)); obj3.userData.points.push(new PMPoint(2.8, -0.944, 0)); obj3.userData.points.push(new PMPoint(0, -0.944, 0)); obj3.userData.points.push(new PMPoint(0, -1.056, 0)); obj3.userData.points.push(new PMPoint(0, -0.944, 2.8)); obj3.userData.points.push(new PMPoint(0, -1.056, 2.8)); obj3.userData.points.push(new PMPoint(2.8, -0.944, 2.8)); obj3.userData.points.push(new PMPoint(2.8, -1.056, 2.8)); obj3.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj3.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj3.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "_bounded"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(0.960402, 1.0396, 1)); obj4.userData.points.push(new PMPoint(1.0396, 0.960402, 1)); obj4.userData.points.push(new PMPoint(0.039598, -0.039598, 0)); obj4.userData.points.push(new PMPoint(-0.039598, 0.039598, 0)); obj4.userData.points.push(new PMPoint(0.039598, -0.039598, 2.8)); obj4.userData.points.push(new PMPoint(-0.039598, 0.039598, 2.8)); obj4.userData.points.push(new PMPoint(1.0396, 0.960402, 2.8)); obj4.userData.points.push(new PMPoint(0.960402, 1.0396, 2.8)); obj4.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj4.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj4.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "_bounded"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(2.8, 1, 1.056)); obj5.userData.points.push(new PMPoint(2.8, 1, 0.944)); obj5.userData.points.push(new PMPoint(1, 1, 0.944)); obj5.userData.points.push(new PMPoint(1, 1, 1.056)); obj5.userData.points.push(new PMPoint(1, 2.8, 0.944)); obj5.userData.points.push(new PMPoint(1, 2.8, 1.056)); obj5.userData.points.push(new PMPoint(2.8, 2.8, 0.944)); obj5.userData.points.push(new PMPoint(2.8, 2.8, 1.056)); obj5.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj5.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [0, 3, 2, 1], [1, 2, 4, 6], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj5.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "_bounded"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(2.8, 0, -1.056)); obj6.userData.points.push(new PMPoint(2.8, 0, -0.944)); obj6.userData.points.push(new PMPoint(0, 0, -0.944)); obj6.userData.points.push(new PMPoint(0, 0, -1.056)); obj6.userData.points.push(new PMPoint(0, 2.8, -0.944)); obj6.userData.points.push(new PMPoint(0, 2.8, -1.056)); obj6.userData.points.push(new PMPoint(2.8, 2.8, -0.944)); obj6.userData.points.push(new PMPoint(2.8, 2.8, -1.056)); obj6.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj6.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj6.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "_bounded"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(0.960402, 1, 1.0396)); obj7.userData.points.push(new PMPoint(1.0396, 1, 0.960402)); obj7.userData.points.push(new PMPoint(0.039598, 0, -0.039598)); obj7.userData.points.push(new PMPoint(-0.039598, 0, 0.039598)); obj7.userData.points.push(new PMPoint(0.039598, 2.8, -0.039598)); obj7.userData.points.push(new PMPoint(-0.039598, 2.8, 0.039598)); obj7.userData.points.push(new PMPoint(1.0396, 2.8, 0.960402)); obj7.userData.points.push(new PMPoint(0.960402, 2.8, 1.0396)); obj7.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj7.userData.facets = [[3, 5, 4, 2], [7, 5, 3, 0], [6, 7, 0, 1], [2, 4, 6, 1], [3, 2, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj7.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "_bounded"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(1, 0.960402, 1.0396)); obj8.userData.points.push(new PMPoint(1, 1.0396, 0.960402)); obj8.userData.points.push(new PMPoint(0, 0.039598, -0.039598)); obj8.userData.points.push(new PMPoint(0, -0.039598, 0.039598)); obj8.userData.points.push(new PMPoint(2.8, 0.039598, -0.039598)); obj8.userData.points.push(new PMPoint(2.8, -0.039598, 0.039598)); obj8.userData.points.push(new PMPoint(2.8, 1.0396, 0.960402)); obj8.userData.points.push(new PMPoint(2.8, 0.960402, 1.0396)); obj8.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj8.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj8.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "_bounded"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(-1.0396, 0.039598, 2.8)); obj9.userData.points.push(new PMPoint(-0.960402, -0.039598, 2.8)); obj9.userData.points.push(new PMPoint(-0.960402, -0.039598, 0)); obj9.userData.points.push(new PMPoint(-1.0396, 0.039598, 0)); obj9.userData.points.push(new PMPoint(-2.8, -1.8792, -1.8396)); obj9.userData.points.push(new PMPoint(-2.8, -1.7208, -1.7604)); obj9.userData.points.push(new PMPoint(-2.8, -1.8792, 2.8)); obj9.userData.points.push(new PMPoint(-2.8, -1.7208, 2.8)); obj9.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj9.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [7, 0, 3, 5], [2, 4, 5, 3], [4, 6, 7, 5], [6, 1, 0, 7]]; <!-- Facet style --> obj9.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "_bounded"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(0.039598, -1.0396, 2.8)); obj10.userData.points.push(new PMPoint(-0.039598, -0.960402, 2.8)); obj10.userData.points.push(new PMPoint(-0.039598, -0.960402, 0)); obj10.userData.points.push(new PMPoint(0.039598, -1.0396, 0)); obj10.userData.points.push(new PMPoint(-1.8792, -2.8, -1.8396)); obj10.userData.points.push(new PMPoint(-1.7208, -2.8, -1.7604)); obj10.userData.points.push(new PMPoint(-1.8792, -2.8, 2.8)); obj10.userData.points.push(new PMPoint(-1.7208, -2.8, 2.8)); obj10.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj10.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [6, 1, 2, 4], [3, 5, 4, 2], [5, 7, 6, 4], [7, 0, 1, 6]]; <!-- Facet style --> obj10.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "_bounded"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(-1, -0.056, 0)); obj11.userData.points.push(new PMPoint(-1, 0.056, 0)); obj11.userData.points.push(new PMPoint(0, 0.056, 0)); obj11.userData.points.push(new PMPoint(0, -0.056, 0)); obj11.userData.points.push(new PMPoint(0, 0.056, 2.8)); obj11.userData.points.push(new PMPoint(0, -0.056, 2.8)); obj11.userData.points.push(new PMPoint(-1, 0.056, 2.8)); obj11.userData.points.push(new PMPoint(-1, -0.056, 2.8)); obj11.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj11.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj11.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "_bounded"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(-0.056, -1, 0)); obj12.userData.points.push(new PMPoint(-0.056, 0, 0)); obj12.userData.points.push(new PMPoint(0.056, 0, 0)); obj12.userData.points.push(new PMPoint(0.056, -1, 0)); obj12.userData.points.push(new PMPoint(0.056, 0, 2.8)); obj12.userData.points.push(new PMPoint(0.056, -1, 2.8)); obj12.userData.points.push(new PMPoint(-0.056, 0, 2.8)); obj12.userData.points.push(new PMPoint(-0.056, -1, 2.8)); obj12.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj12.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj12.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "_bounded"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(-1.0396, 2.8, 0.039598)); obj13.userData.points.push(new PMPoint(-0.960402, 2.8, -0.039598)); obj13.userData.points.push(new PMPoint(-0.960402, 0, -0.039598)); obj13.userData.points.push(new PMPoint(-1.0396, 0, 0.039598)); obj13.userData.points.push(new PMPoint(-2.8, -1.8396, -1.8792)); obj13.userData.points.push(new PMPoint(-2.8, -1.7604, -1.7208)); obj13.userData.points.push(new PMPoint(-2.8, 2.8, -1.8792)); obj13.userData.points.push(new PMPoint(-2.8, 2.8, -1.7208)); obj13.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj13.userData.facets = [[1, 2, 4, 6], [3, 2, 1, 0], [4, 2, 3, 5], [5, 3, 0, 7], [6, 4, 5, 7], [1, 6, 7, 0]]; <!-- Facet style --> obj13.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "_bounded"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(0.039598, 2.8, -1.0396)); obj14.userData.points.push(new PMPoint(-0.039598, 2.8, -0.960402)); obj14.userData.points.push(new PMPoint(-0.039598, 0, -0.960402)); obj14.userData.points.push(new PMPoint(0.039598, 0, -1.0396)); obj14.userData.points.push(new PMPoint(-1.8792, -1.8396, -2.8)); obj14.userData.points.push(new PMPoint(-1.7208, -1.7604, -2.8)); obj14.userData.points.push(new PMPoint(-1.8792, 2.8, -2.8)); obj14.userData.points.push(new PMPoint(-1.7208, 2.8, -2.8)); obj14.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj14.userData.facets = [[0, 3, 5, 7], [2, 3, 0, 1], [5, 3, 2, 4], [4, 2, 1, 6], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj14.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "_bounded"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(-1, 0, -0.056)); obj15.userData.points.push(new PMPoint(-1, 0, 0.056)); obj15.userData.points.push(new PMPoint(0, 0, 0.056)); obj15.userData.points.push(new PMPoint(0, 0, -0.056)); obj15.userData.points.push(new PMPoint(0, 2.8, 0.056)); obj15.userData.points.push(new PMPoint(0, 2.8, -0.056)); obj15.userData.points.push(new PMPoint(-1, 2.8, 0.056)); obj15.userData.points.push(new PMPoint(-1, 2.8, -0.056)); obj15.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj15.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj15.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "_bounded"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(-0.056, 0, -1)); obj16.userData.points.push(new PMPoint(-0.056, 0, 0)); obj16.userData.points.push(new PMPoint(0.056, 0, 0)); obj16.userData.points.push(new PMPoint(0.056, 0, -1)); obj16.userData.points.push(new PMPoint(0.056, 2.8, 0)); obj16.userData.points.push(new PMPoint(0.056, 2.8, -1)); obj16.userData.points.push(new PMPoint(-0.056, 2.8, 0)); obj16.userData.points.push(new PMPoint(-0.056, 2.8, -1)); obj16.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj16.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj16.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "_bounded"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(-2.7604, -2.8, -2.7208)); obj17.userData.points.push(new PMPoint(-1, -0.039598, 0.039598)); obj17.userData.points.push(new PMPoint(-1, 0.039598, -0.039598)); obj17.userData.points.push(new PMPoint(0, 0.039598, -0.039598)); obj17.userData.points.push(new PMPoint(0, -0.039598, 0.039598)); obj17.userData.points.push(new PMPoint(-2.7604, -2.7208, -2.8)); obj17.userData.points.push(new PMPoint(-2.8, -1.7604, -1.8396)); obj17.userData.points.push(new PMPoint(-2.8, -2.7208, -2.8)); obj17.userData.points.push(new PMPoint(-2.8, -1.8396, -1.7604)); obj17.userData.points.push(new PMPoint(-2.8, -2.8, -2.7208)); obj17.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj17.userData.edgeindices = [1, 2, 2, 3, 0, 4, 1, 4, 3, 4, 3, 5, 2, 6, 5, 7, 6, 7, 1, 8, 6, 8, 0, 9, 8, 9, 0, 10, 5, 10, 7, 10, 9, 10]; obj17.userData.facets = [[8, 1, 2, 6], [4, 1, 8, 9, 0], [3, 4, 0, 10, 5], [6, 2, 3, 5, 7], [2, 1, 4, 3], [8, 6, 7, 10, 9], [9, 10, 0], [7, 5, 10]]; <!-- Facet style --> obj17.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "_bounded"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(2.8, -1.0396, 0.039598)); obj18.userData.points.push(new PMPoint(2.8, -0.960402, -0.039598)); obj18.userData.points.push(new PMPoint(0, -0.960402, -0.039598)); obj18.userData.points.push(new PMPoint(0, -1.0396, 0.039598)); obj18.userData.points.push(new PMPoint(-1.8396, -2.8, -1.8792)); obj18.userData.points.push(new PMPoint(-1.7604, -2.8, -1.7208)); obj18.userData.points.push(new PMPoint(2.8, -2.8, -1.8792)); obj18.userData.points.push(new PMPoint(2.8, -2.8, -1.7208)); obj18.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj18.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [2, 4, 5, 3], [7, 0, 3, 5], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj18.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "_bounded"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(2.8, 0.039598, -1.0396)); obj19.userData.points.push(new PMPoint(2.8, -0.039598, -0.960402)); obj19.userData.points.push(new PMPoint(0, -0.039598, -0.960402)); obj19.userData.points.push(new PMPoint(0, 0.039598, -1.0396)); obj19.userData.points.push(new PMPoint(-1.8396, -1.8792, -2.8)); obj19.userData.points.push(new PMPoint(-1.7604, -1.7208, -2.8)); obj19.userData.points.push(new PMPoint(2.8, -1.8792, -2.8)); obj19.userData.points.push(new PMPoint(2.8, -1.7208, -2.8)); obj19.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj19.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [3, 5, 4, 2], [6, 1, 2, 4], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj19.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "_bounded"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(0, -1, -0.056)); obj20.userData.points.push(new PMPoint(0, -1, 0.056)); obj20.userData.points.push(new PMPoint(0, 0, 0.056)); obj20.userData.points.push(new PMPoint(0, 0, -0.056)); obj20.userData.points.push(new PMPoint(2.8, 0, 0.056)); obj20.userData.points.push(new PMPoint(2.8, 0, -0.056)); obj20.userData.points.push(new PMPoint(2.8, -1, 0.056)); obj20.userData.points.push(new PMPoint(2.8, -1, -0.056)); obj20.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj20.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj20.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "_bounded"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(0, -0.056, -1)); obj21.userData.points.push(new PMPoint(0, -0.056, 0)); obj21.userData.points.push(new PMPoint(0, 0.056, 0)); obj21.userData.points.push(new PMPoint(0, 0.056, -1)); obj21.userData.points.push(new PMPoint(2.8, 0.056, 0)); obj21.userData.points.push(new PMPoint(2.8, 0.056, -1)); obj21.userData.points.push(new PMPoint(2.8, -0.056, 0)); obj21.userData.points.push(new PMPoint(2.8, -0.056, -1)); obj21.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj21.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj21.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "_bounded"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(-2.7208, -2.8, -2.8)); obj22.userData.points.push(new PMPoint(-1.7604, -2.8, -1.8396)); obj22.userData.points.push(new PMPoint(-1.8396, -2.8, -1.7604)); obj22.userData.points.push(new PMPoint(-0.039598, -1, 0.039598)); obj22.userData.points.push(new PMPoint(0.039598, -1, -0.039598)); obj22.userData.points.push(new PMPoint(0.039598, 0, -0.039598)); obj22.userData.points.push(new PMPoint(-0.039598, 0, 0.039598)); obj22.userData.points.push(new PMPoint(-2.7208, -2.7604, -2.8)); obj22.userData.points.push(new PMPoint(-2.8, -2.7604, -2.7208)); obj22.userData.points.push(new PMPoint(-2.8, -2.8, -2.7208)); obj22.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj22.userData.edgeindices = [0, 1, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 0, 7, 5, 7, 6, 8, 2, 9, 8, 9, 0, 10, 7, 10, 8, 10, 9, 10]; obj22.userData.facets = [[2, 3, 6, 8, 9], [4, 3, 2, 1], [5, 4, 1, 0, 7], [8, 6, 5, 7, 10], [6, 3, 4, 5], [9, 8, 10], [2, 9, 10, 0, 1], [10, 7, 0]]; <!-- Facet style --> obj22.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "_bounded"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(-2.7208, -2.8, -2.8)); obj23.userData.points.push(new PMPoint(-2.7208, -2.8, -2.7604)); obj23.userData.points.push(new PMPoint(-0.039598, 0.039598, -1)); obj23.userData.points.push(new PMPoint(0.039598, -0.039598, -1)); obj23.userData.points.push(new PMPoint(0.039598, -0.039598, 0)); obj23.userData.points.push(new PMPoint(-0.039598, 0.039598, 0)); obj23.userData.points.push(new PMPoint(-1.7604, -1.8396, -2.8)); obj23.userData.points.push(new PMPoint(-1.8396, -1.7604, -2.8)); obj23.userData.points.push(new PMPoint(-2.8, -2.7208, -2.7604)); obj23.userData.points.push(new PMPoint(-2.8, -2.7208, -2.8)); obj23.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj23.userData.edgeindices = [0, 1, 2, 3, 1, 4, 3, 4, 2, 5, 4, 5, 0, 6, 3, 6, 2, 7, 6, 7, 5, 8, 7, 9, 8, 9, 0, 10, 1, 10, 8, 10, 9, 10]; obj23.userData.facets = [[7, 2, 3, 6], [5, 2, 7, 9, 8], [4, 5, 8, 10, 1], [6, 3, 4, 1, 0], [3, 2, 5, 4], [9, 10, 8], [0, 1, 10], [7, 6, 0, 10, 9]]; <!-- Facet style --> obj23.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj23); scene.add(obj23); var obj24 = new THREE.Object3D(); obj24.name = "_bounded"; obj24.userData.explodable = 1; obj24.userData.points = []; obj24.userData.points.push(new PMPoint(-1.056, 2.8, 0)); obj24.userData.points.push(new PMPoint(-0.944, 2.8, 0)); obj24.userData.points.push(new PMPoint(-0.944, 0, 0)); obj24.userData.points.push(new PMPoint(-1.056, 0, 0)); obj24.userData.points.push(new PMPoint(-0.944, 0, 2.8)); obj24.userData.points.push(new PMPoint(-1.056, 0, 2.8)); obj24.userData.points.push(new PMPoint(-0.944, 2.8, 2.8)); obj24.userData.points.push(new PMPoint(-1.056, 2.8, 2.8)); obj24.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj24.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj24.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj24); scene.add(obj24); var obj25 = new THREE.Object3D(); obj25.name = "_bounded"; obj25.userData.explodable = 1; obj25.userData.points = []; obj25.userData.points.push(new PMPoint(2.8, 1.056, 1)); obj25.userData.points.push(new PMPoint(2.8, 0.944, 1)); obj25.userData.points.push(new PMPoint(1, 0.944, 1)); obj25.userData.points.push(new PMPoint(1, 1.056, 1)); obj25.userData.points.push(new PMPoint(1, 0.944, 2.8)); obj25.userData.points.push(new PMPoint(1, 1.056, 2.8)); obj25.userData.points.push(new PMPoint(2.8, 0.944, 2.8)); obj25.userData.points.push(new PMPoint(2.8, 1.056, 2.8)); obj25.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj25.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [3, 0, 1, 2], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj25.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj25); scene.add(obj25); var obj26 = new THREE.Object3D(); obj26.name = "_bounded"; obj26.userData.explodable = 1; obj26.userData.points = []; obj26.userData.points.push(new PMPoint(2.8, -1.056, 0)); obj26.userData.points.push(new PMPoint(2.8, -0.944, 0)); obj26.userData.points.push(new PMPoint(0, -0.944, 0)); obj26.userData.points.push(new PMPoint(0, -1.056, 0)); obj26.userData.points.push(new PMPoint(0, -0.944, 2.8)); obj26.userData.points.push(new PMPoint(0, -1.056, 2.8)); obj26.userData.points.push(new PMPoint(2.8, -0.944, 2.8)); obj26.userData.points.push(new PMPoint(2.8, -1.056, 2.8)); obj26.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj26.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj26.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj26); scene.add(obj26); var obj27 = new THREE.Object3D(); obj27.name = "_bounded"; obj27.userData.explodable = 1; obj27.userData.points = []; obj27.userData.points.push(new PMPoint(0.960402, 1.0396, 1)); obj27.userData.points.push(new PMPoint(1.0396, 0.960402, 1)); obj27.userData.points.push(new PMPoint(0.039598, -0.039598, 0)); obj27.userData.points.push(new PMPoint(-0.039598, 0.039598, 0)); obj27.userData.points.push(new PMPoint(0.039598, -0.039598, 2.8)); obj27.userData.points.push(new PMPoint(-0.039598, 0.039598, 2.8)); obj27.userData.points.push(new PMPoint(1.0396, 0.960402, 2.8)); obj27.userData.points.push(new PMPoint(0.960402, 1.0396, 2.8)); obj27.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj27.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj27.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj27); scene.add(obj27); var obj28 = new THREE.Object3D(); obj28.name = "_bounded"; obj28.userData.explodable = 1; obj28.userData.points = []; obj28.userData.points.push(new PMPoint(2.8, 1, 1.056)); obj28.userData.points.push(new PMPoint(2.8, 1, 0.944)); obj28.userData.points.push(new PMPoint(1, 1, 0.944)); obj28.userData.points.push(new PMPoint(1, 1, 1.056)); obj28.userData.points.push(new PMPoint(1, 2.8, 0.944)); obj28.userData.points.push(new PMPoint(1, 2.8, 1.056)); obj28.userData.points.push(new PMPoint(2.8, 2.8, 0.944)); obj28.userData.points.push(new PMPoint(2.8, 2.8, 1.056)); obj28.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj28.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [0, 3, 2, 1], [1, 2, 4, 6], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj28.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj28); scene.add(obj28); var obj29 = new THREE.Object3D(); obj29.name = "_bounded"; obj29.userData.explodable = 1; obj29.userData.points = []; obj29.userData.points.push(new PMPoint(2.8, 0, -1.056)); obj29.userData.points.push(new PMPoint(2.8, 0, -0.944)); obj29.userData.points.push(new PMPoint(0, 0, -0.944)); obj29.userData.points.push(new PMPoint(0, 0, -1.056)); obj29.userData.points.push(new PMPoint(0, 2.8, -0.944)); obj29.userData.points.push(new PMPoint(0, 2.8, -1.056)); obj29.userData.points.push(new PMPoint(2.8, 2.8, -0.944)); obj29.userData.points.push(new PMPoint(2.8, 2.8, -1.056)); obj29.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj29.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj29.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj29); scene.add(obj29); var obj30 = new THREE.Object3D(); obj30.name = "_bounded"; obj30.userData.explodable = 1; obj30.userData.points = []; obj30.userData.points.push(new PMPoint(0.960402, 1, 1.0396)); obj30.userData.points.push(new PMPoint(1.0396, 1, 0.960402)); obj30.userData.points.push(new PMPoint(0.039598, 0, -0.039598)); obj30.userData.points.push(new PMPoint(-0.039598, 0, 0.039598)); obj30.userData.points.push(new PMPoint(0.039598, 2.8, -0.039598)); obj30.userData.points.push(new PMPoint(-0.039598, 2.8, 0.039598)); obj30.userData.points.push(new PMPoint(1.0396, 2.8, 0.960402)); obj30.userData.points.push(new PMPoint(0.960402, 2.8, 1.0396)); obj30.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj30.userData.facets = [[3, 5, 4, 2], [7, 5, 3, 0], [6, 7, 0, 1], [2, 4, 6, 1], [3, 2, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj30.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj30); scene.add(obj30); var obj31 = new THREE.Object3D(); obj31.name = "_bounded"; obj31.userData.explodable = 1; obj31.userData.points = []; obj31.userData.points.push(new PMPoint(1, 0.960402, 1.0396)); obj31.userData.points.push(new PMPoint(1, 1.0396, 0.960402)); obj31.userData.points.push(new PMPoint(0, 0.039598, -0.039598)); obj31.userData.points.push(new PMPoint(0, -0.039598, 0.039598)); obj31.userData.points.push(new PMPoint(2.8, 0.039598, -0.039598)); obj31.userData.points.push(new PMPoint(2.8, -0.039598, 0.039598)); obj31.userData.points.push(new PMPoint(2.8, 1.0396, 0.960402)); obj31.userData.points.push(new PMPoint(2.8, 0.960402, 1.0396)); obj31.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj31.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj31.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj31); scene.add(obj31); var obj32 = new THREE.Object3D(); obj32.name = "_bounded"; obj32.userData.explodable = 1; obj32.userData.points = []; obj32.userData.points.push(new PMPoint(-1.0396, 0.039598, 2.8)); obj32.userData.points.push(new PMPoint(-0.960402, -0.039598, 2.8)); obj32.userData.points.push(new PMPoint(-0.960402, -0.039598, 0)); obj32.userData.points.push(new PMPoint(-1.0396, 0.039598, 0)); obj32.userData.points.push(new PMPoint(-2.8, -1.8792, -1.8396)); obj32.userData.points.push(new PMPoint(-2.8, -1.7208, -1.7604)); obj32.userData.points.push(new PMPoint(-2.8, -1.8792, 2.8)); obj32.userData.points.push(new PMPoint(-2.8, -1.7208, 2.8)); obj32.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj32.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [7, 0, 3, 5], [2, 4, 5, 3], [4, 6, 7, 5], [6, 1, 0, 7]]; <!-- Facet style --> obj32.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj32); scene.add(obj32); var obj33 = new THREE.Object3D(); obj33.name = "_bounded"; obj33.userData.explodable = 1; obj33.userData.points = []; obj33.userData.points.push(new PMPoint(0.039598, -1.0396, 2.8)); obj33.userData.points.push(new PMPoint(-0.039598, -0.960402, 2.8)); obj33.userData.points.push(new PMPoint(-0.039598, -0.960402, 0)); obj33.userData.points.push(new PMPoint(0.039598, -1.0396, 0)); obj33.userData.points.push(new PMPoint(-1.8792, -2.8, -1.8396)); obj33.userData.points.push(new PMPoint(-1.7208, -2.8, -1.7604)); obj33.userData.points.push(new PMPoint(-1.8792, -2.8, 2.8)); obj33.userData.points.push(new PMPoint(-1.7208, -2.8, 2.8)); obj33.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj33.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [6, 1, 2, 4], [3, 5, 4, 2], [5, 7, 6, 4], [7, 0, 1, 6]]; <!-- Facet style --> obj33.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj33); scene.add(obj33); var obj34 = new THREE.Object3D(); obj34.name = "_bounded"; obj34.userData.explodable = 1; obj34.userData.points = []; obj34.userData.points.push(new PMPoint(-1, -0.056, 0)); obj34.userData.points.push(new PMPoint(-1, 0.056, 0)); obj34.userData.points.push(new PMPoint(0, 0.056, 0)); obj34.userData.points.push(new PMPoint(0, -0.056, 0)); obj34.userData.points.push(new PMPoint(0, 0.056, 2.8)); obj34.userData.points.push(new PMPoint(0, -0.056, 2.8)); obj34.userData.points.push(new PMPoint(-1, 0.056, 2.8)); obj34.userData.points.push(new PMPoint(-1, -0.056, 2.8)); obj34.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj34.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj34.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj34); scene.add(obj34); var obj35 = new THREE.Object3D(); obj35.name = "_bounded"; obj35.userData.explodable = 1; obj35.userData.points = []; obj35.userData.points.push(new PMPoint(-0.056, -1, 0)); obj35.userData.points.push(new PMPoint(-0.056, 0, 0)); obj35.userData.points.push(new PMPoint(0.056, 0, 0)); obj35.userData.points.push(new PMPoint(0.056, -1, 0)); obj35.userData.points.push(new PMPoint(0.056, 0, 2.8)); obj35.userData.points.push(new PMPoint(0.056, -1, 2.8)); obj35.userData.points.push(new PMPoint(-0.056, 0, 2.8)); obj35.userData.points.push(new PMPoint(-0.056, -1, 2.8)); obj35.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj35.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj35.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj35); scene.add(obj35); var obj36 = new THREE.Object3D(); obj36.name = "_bounded"; obj36.userData.explodable = 1; obj36.userData.points = []; obj36.userData.points.push(new PMPoint(-1.0396, 2.8, 0.039598)); obj36.userData.points.push(new PMPoint(-0.960402, 2.8, -0.039598)); obj36.userData.points.push(new PMPoint(-0.960402, 0, -0.039598)); obj36.userData.points.push(new PMPoint(-1.0396, 0, 0.039598)); obj36.userData.points.push(new PMPoint(-2.8, -1.8396, -1.8792)); obj36.userData.points.push(new PMPoint(-2.8, -1.7604, -1.7208)); obj36.userData.points.push(new PMPoint(-2.8, 2.8, -1.8792)); obj36.userData.points.push(new PMPoint(-2.8, 2.8, -1.7208)); obj36.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj36.userData.facets = [[1, 2, 4, 6], [3, 2, 1, 0], [4, 2, 3, 5], [5, 3, 0, 7], [6, 4, 5, 7], [1, 6, 7, 0]]; <!-- Facet style --> obj36.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj36); scene.add(obj36); var obj37 = new THREE.Object3D(); obj37.name = "_bounded"; obj37.userData.explodable = 1; obj37.userData.points = []; obj37.userData.points.push(new PMPoint(0.039598, 2.8, -1.0396)); obj37.userData.points.push(new PMPoint(-0.039598, 2.8, -0.960402)); obj37.userData.points.push(new PMPoint(-0.039598, 0, -0.960402)); obj37.userData.points.push(new PMPoint(0.039598, 0, -1.0396)); obj37.userData.points.push(new PMPoint(-1.8792, -1.8396, -2.8)); obj37.userData.points.push(new PMPoint(-1.7208, -1.7604, -2.8)); obj37.userData.points.push(new PMPoint(-1.8792, 2.8, -2.8)); obj37.userData.points.push(new PMPoint(-1.7208, 2.8, -2.8)); obj37.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj37.userData.facets = [[0, 3, 5, 7], [2, 3, 0, 1], [5, 3, 2, 4], [4, 2, 1, 6], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj37.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj37); scene.add(obj37); var obj38 = new THREE.Object3D(); obj38.name = "_bounded"; obj38.userData.explodable = 1; obj38.userData.points = []; obj38.userData.points.push(new PMPoint(-1, 0, -0.056)); obj38.userData.points.push(new PMPoint(-1, 0, 0.056)); obj38.userData.points.push(new PMPoint(0, 0, 0.056)); obj38.userData.points.push(new PMPoint(0, 0, -0.056)); obj38.userData.points.push(new PMPoint(0, 2.8, 0.056)); obj38.userData.points.push(new PMPoint(0, 2.8, -0.056)); obj38.userData.points.push(new PMPoint(-1, 2.8, 0.056)); obj38.userData.points.push(new PMPoint(-1, 2.8, -0.056)); obj38.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj38.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj38.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj38); scene.add(obj38); var obj39 = new THREE.Object3D(); obj39.name = "_bounded"; obj39.userData.explodable = 1; obj39.userData.points = []; obj39.userData.points.push(new PMPoint(-0.056, 0, -1)); obj39.userData.points.push(new PMPoint(-0.056, 0, 0)); obj39.userData.points.push(new PMPoint(0.056, 0, 0)); obj39.userData.points.push(new PMPoint(0.056, 0, -1)); obj39.userData.points.push(new PMPoint(0.056, 2.8, 0)); obj39.userData.points.push(new PMPoint(0.056, 2.8, -1)); obj39.userData.points.push(new PMPoint(-0.056, 2.8, 0)); obj39.userData.points.push(new PMPoint(-0.056, 2.8, -1)); obj39.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj39.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj39.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj39); scene.add(obj39); var obj40 = new THREE.Object3D(); obj40.name = "_bounded"; obj40.userData.explodable = 1; obj40.userData.points = []; obj40.userData.points.push(new PMPoint(-2.7604, -2.8, -2.7208)); obj40.userData.points.push(new PMPoint(-1, -0.039598, 0.039598)); obj40.userData.points.push(new PMPoint(-1, 0.039598, -0.039598)); obj40.userData.points.push(new PMPoint(0, 0.039598, -0.039598)); obj40.userData.points.push(new PMPoint(0, -0.039598, 0.039598)); obj40.userData.points.push(new PMPoint(-2.7604, -2.7208, -2.8)); obj40.userData.points.push(new PMPoint(-2.8, -1.7604, -1.8396)); obj40.userData.points.push(new PMPoint(-2.8, -2.7208, -2.8)); obj40.userData.points.push(new PMPoint(-2.8, -1.8396, -1.7604)); obj40.userData.points.push(new PMPoint(-2.8, -2.8, -2.7208)); obj40.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj40.userData.edgeindices = [1, 2, 2, 3, 0, 4, 1, 4, 3, 4, 3, 5, 2, 6, 5, 7, 6, 7, 1, 8, 6, 8, 0, 9, 8, 9, 0, 10, 5, 10, 7, 10, 9, 10]; obj40.userData.facets = [[8, 1, 2, 6], [4, 1, 8, 9, 0], [3, 4, 0, 10, 5], [6, 2, 3, 5, 7], [2, 1, 4, 3], [8, 6, 7, 10, 9], [9, 10, 0], [7, 5, 10]]; <!-- Facet style --> obj40.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj40); scene.add(obj40); var obj41 = new THREE.Object3D(); obj41.name = "_bounded"; obj41.userData.explodable = 1; obj41.userData.points = []; obj41.userData.points.push(new PMPoint(2.8, -1.0396, 0.039598)); obj41.userData.points.push(new PMPoint(2.8, -0.960402, -0.039598)); obj41.userData.points.push(new PMPoint(0, -0.960402, -0.039598)); obj41.userData.points.push(new PMPoint(0, -1.0396, 0.039598)); obj41.userData.points.push(new PMPoint(-1.8396, -2.8, -1.8792)); obj41.userData.points.push(new PMPoint(-1.7604, -2.8, -1.7208)); obj41.userData.points.push(new PMPoint(2.8, -2.8, -1.8792)); obj41.userData.points.push(new PMPoint(2.8, -2.8, -1.7208)); obj41.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj41.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [2, 4, 5, 3], [7, 0, 3, 5], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj41.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj41); scene.add(obj41); var obj42 = new THREE.Object3D(); obj42.name = "_bounded"; obj42.userData.explodable = 1; obj42.userData.points = []; obj42.userData.points.push(new PMPoint(2.8, 0.039598, -1.0396)); obj42.userData.points.push(new PMPoint(2.8, -0.039598, -0.960402)); obj42.userData.points.push(new PMPoint(0, -0.039598, -0.960402)); obj42.userData.points.push(new PMPoint(0, 0.039598, -1.0396)); obj42.userData.points.push(new PMPoint(-1.8396, -1.8792, -2.8)); obj42.userData.points.push(new PMPoint(-1.7604, -1.7208, -2.8)); obj42.userData.points.push(new PMPoint(2.8, -1.8792, -2.8)); obj42.userData.points.push(new PMPoint(2.8, -1.7208, -2.8)); obj42.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj42.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [3, 5, 4, 2], [6, 1, 2, 4], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj42.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj42); scene.add(obj42); var obj43 = new THREE.Object3D(); obj43.name = "_bounded"; obj43.userData.explodable = 1; obj43.userData.points = []; obj43.userData.points.push(new PMPoint(0, -1, -0.056)); obj43.userData.points.push(new PMPoint(0, -1, 0.056)); obj43.userData.points.push(new PMPoint(0, 0, 0.056)); obj43.userData.points.push(new PMPoint(0, 0, -0.056)); obj43.userData.points.push(new PMPoint(2.8, 0, 0.056)); obj43.userData.points.push(new PMPoint(2.8, 0, -0.056)); obj43.userData.points.push(new PMPoint(2.8, -1, 0.056)); obj43.userData.points.push(new PMPoint(2.8, -1, -0.056)); obj43.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj43.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj43.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj43); scene.add(obj43); var obj44 = new THREE.Object3D(); obj44.name = "_bounded"; obj44.userData.explodable = 1; obj44.userData.points = []; obj44.userData.points.push(new PMPoint(0, -0.056, -1)); obj44.userData.points.push(new PMPoint(0, -0.056, 0)); obj44.userData.points.push(new PMPoint(0, 0.056, 0)); obj44.userData.points.push(new PMPoint(0, 0.056, -1)); obj44.userData.points.push(new PMPoint(2.8, 0.056, 0)); obj44.userData.points.push(new PMPoint(2.8, 0.056, -1)); obj44.userData.points.push(new PMPoint(2.8, -0.056, 0)); obj44.userData.points.push(new PMPoint(2.8, -0.056, -1)); obj44.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj44.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj44.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj44); scene.add(obj44); var obj45 = new THREE.Object3D(); obj45.name = "_bounded"; obj45.userData.explodable = 1; obj45.userData.points = []; obj45.userData.points.push(new PMPoint(-2.7208, -2.8, -2.8)); obj45.userData.points.push(new PMPoint(-1.7604, -2.8, -1.8396)); obj45.userData.points.push(new PMPoint(-1.8396, -2.8, -1.7604)); obj45.userData.points.push(new PMPoint(-0.039598, -1, 0.039598)); obj45.userData.points.push(new PMPoint(0.039598, -1, -0.039598)); obj45.userData.points.push(new PMPoint(0.039598, 0, -0.039598)); obj45.userData.points.push(new PMPoint(-0.039598, 0, 0.039598)); obj45.userData.points.push(new PMPoint(-2.7208, -2.7604, -2.8)); obj45.userData.points.push(new PMPoint(-2.8, -2.7604, -2.7208)); obj45.userData.points.push(new PMPoint(-2.8, -2.8, -2.7208)); obj45.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj45.userData.edgeindices = [0, 1, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 0, 7, 5, 7, 6, 8, 2, 9, 8, 9, 0, 10, 7, 10, 8, 10, 9, 10]; obj45.userData.facets = [[2, 3, 6, 8, 9], [4, 3, 2, 1], [5, 4, 1, 0, 7], [8, 6, 5, 7, 10], [6, 3, 4, 5], [9, 8, 10], [2, 9, 10, 0, 1], [10, 7, 0]]; <!-- Facet style --> obj45.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj45); scene.add(obj45); var obj46 = new THREE.Object3D(); obj46.name = "_bounded"; obj46.userData.explodable = 1; obj46.userData.points = []; obj46.userData.points.push(new PMPoint(-2.7208, -2.8, -2.8)); obj46.userData.points.push(new PMPoint(-2.7208, -2.8, -2.7604)); obj46.userData.points.push(new PMPoint(-0.039598, 0.039598, -1)); obj46.userData.points.push(new PMPoint(0.039598, -0.039598, -1)); obj46.userData.points.push(new PMPoint(0.039598, -0.039598, 0)); obj46.userData.points.push(new PMPoint(-0.039598, 0.039598, 0)); obj46.userData.points.push(new PMPoint(-1.7604, -1.8396, -2.8)); obj46.userData.points.push(new PMPoint(-1.8396, -1.7604, -2.8)); obj46.userData.points.push(new PMPoint(-2.8, -2.7208, -2.7604)); obj46.userData.points.push(new PMPoint(-2.8, -2.7208, -2.8)); obj46.userData.points.push(new PMPoint(-2.8, -2.8, -2.8)); obj46.userData.edgeindices = [0, 1, 2, 3, 1, 4, 3, 4, 2, 5, 4, 5, 0, 6, 3, 6, 2, 7, 6, 7, 5, 8, 7, 9, 8, 9, 0, 10, 1, 10, 8, 10, 9, 10]; obj46.userData.facets = [[7, 2, 3, 6], [5, 2, 7, 9, 8], [4, 5, 8, 10, 1], [6, 3, 4, 1, 0], [3, 2, 5, 4], [9, 10, 8], [0, 1, 10], [7, 6, 0, 10, 9]]; <!-- Facet style --> obj46.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj46); scene.add(obj46); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_2'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_2').style.visibility = 'visible'; document.getElementById('showSettingsButton_2').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_2').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_2').style.visibility = 'hidden'; document.getElementById('showSettingsButton_2').style.visibility = 'visible'; document.getElementById('hideSettingsButton_2').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_2'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_2'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_2').oninput = triggerExplode; document.getElementById('explodeCheckbox_2').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_2').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_2').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_2').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_2'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_2'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_2').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_2').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_2').onchange = toggleDepthWrite; document.getElementById('changeRotationX_2').onchange = changeRotationX; document.getElementById('changeRotationY_2').onchange = changeRotationY; document.getElementById('changeRotationZ_2').onchange = changeRotationZ; document.getElementById('resetButton_2').onclick = resetScene; document.getElementById('rotationSpeedRange_2').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_2').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_2').onclick = showSettings; document.getElementById('hideSettingsButton_2').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_2').dispatchEvent(event); } else { document.getElementById('showSettingsButton_2').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> ===== Tropical Curves ===== ==== A: creating tropical curves in polymake ==== The simplest way to construct tropical curves in polymake is to write them as the stable intersection of two tropical hypersurfaces. <code perl> > $mQuadric = [ [2,0,0,0], [0,2,0,0], [0,0,2,0], [0,0,0,2], > [1,1,0,0], [1,0,1,0], [1,0,0,1], > [0,1,1,0], [0,1,0,1], [0,0,1,1]]; > $cQuadric = [1,-1/4,-2/4,-3/4,-3/4,-4/4,-5/4,2/4,0,-2/4]; > $TQuadric = new Hypersurface<Min>(MONOMIALS=>$mQuadric, COEFFICIENTS=>$cQuadric); > $mCubic = [ [3,0,0,0], [0,3,0,0], [0,0,3,0], [0,0,0,3], > [1,1,1,0], [1,1,0,1], [1,0,1,1], [0,1,1,1], > [2,1,0,0], [2,0,1,0], [2,0,0,1], > [1,2,0,0], [1,0,2,0], [1,0,0,2], > [0,2,1,0], [0,2,0,1], [0,1,2,0], > [0,1,0,2], [0,0,2,1], [0,0,1,2]]; > $cCubic = [3,3,3,3,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1]; > $TCubic = new Hypersurface<Min>(MONOMIALS=>$mCubic, COEFFICIENTS=>$cCubic); > $TSextic = intersect($TQuadric,$TCubic); > $TSextic->VISUAL; </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:24 2022 unnamed --> <html> <head> <meta charset=utf-8> <title>unnamed</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model20892543358 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_3' class='settings'> <div class=group id='explode_3'> <strong>Explode</strong> <input id='explodeRange_3' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_3' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_3' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_3' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_3' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_3' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_3'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_3'> x-axis</div> <div><input type='checkbox' id='changeRotationY_3'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_3'> z-axis</div> <button id='resetButton_3'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_3' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_3'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_3' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_3' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_3'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_3"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_3'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_3' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_3' > New tab<br> </form> <button id='takeScreenshot_3'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_3' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_3' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model20892543358"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model20892543358"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model20892543358'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj0.userData.points.push(new PMPoint(-1, -0.875, 0)); obj0.userData.pointradii = 0.002; <!-- Vertex style --> obj0.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj0.userData.edgeindices = [1, 0]; <!-- Edge style --> obj0.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(-1, -0.875, 0)); obj1.userData.points.push(new PMPoint(-1, -0.875, 3.25)); obj1.userData.pointradii = 0.002; <!-- Vertex style --> obj1.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj1.userData.edgeindices = [1, 0]; <!-- Edge style --> obj1.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(-1, -0.875, 0)); obj2.userData.points.push(new PMPoint(-2, -1.875, -1)); obj2.userData.pointradii = 0.002; <!-- Vertex style --> obj2.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj2.userData.edgeindices = [1, 0]; <!-- Edge style --> obj2.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj3.userData.points.push(new PMPoint(-1, 0, -0.75)); obj3.userData.pointradii = 0.002; <!-- Vertex style --> obj3.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj3.userData.edgeindices = [1, 0]; <!-- Edge style --> obj3.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(-1, 0, -0.75)); obj4.userData.points.push(new PMPoint(-1, 3.25, -0.75)); obj4.userData.pointradii = 0.002; <!-- Vertex style --> obj4.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj4.userData.edgeindices = [1, 0]; <!-- Edge style --> obj4.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(-1, 0, -0.75)); obj5.userData.points.push(new PMPoint(-2, -1, -1.75)); obj5.userData.pointradii = 0.002; <!-- Vertex style --> obj5.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj5.userData.edgeindices = [1, 0]; <!-- Edge style --> obj5.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "unnamed__7"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj6.userData.points.push(new PMPoint(0, -1, -0.875)); obj6.userData.pointradii = 0.002; <!-- Vertex style --> obj6.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj6.userData.edgeindices = [1, 0]; <!-- Edge style --> obj6.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "unnamed__8"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(0, -1, -0.875)); obj7.userData.points.push(new PMPoint(3.25, -1, -0.875)); obj7.userData.pointradii = 0.002; <!-- Vertex style --> obj7.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj7.userData.edgeindices = [1, 0]; <!-- Edge style --> obj7.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "unnamed__9"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(0, -1, -0.875)); obj8.userData.points.push(new PMPoint(-1, -2, -1.875)); obj8.userData.pointradii = 0.002; <!-- Vertex style --> obj8.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj8.userData.edgeindices = [1, 0]; <!-- Edge style --> obj8.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "unnamed__10"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj9.userData.points.push(new PMPoint(-0.5, 0, 0)); obj9.userData.pointradii = 0.002; <!-- Vertex style --> obj9.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj9.userData.edgeindices = [1, 0]; <!-- Edge style --> obj9.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "unnamed__11"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(-0.5, 0, 0)); obj10.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj10.userData.pointradii = 0.002; <!-- Vertex style --> obj10.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj10.userData.edgeindices = [1, 0]; <!-- Edge style --> obj10.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "unnamed__12"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj11.userData.points.push(new PMPoint(-0.5, 0.5, 3.25)); obj11.userData.pointradii = 0.002; <!-- Vertex style --> obj11.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj11.userData.edgeindices = [1, 0]; <!-- Edge style --> obj11.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "unnamed__13"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj12.userData.points.push(new PMPoint(-0.5, 3.25, 0.5)); obj12.userData.pointradii = 0.002; <!-- Vertex style --> obj12.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj12.userData.edgeindices = [1, 0]; <!-- Edge style --> obj12.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "unnamed__14"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(2, 2, 2.25)); obj13.userData.points.push(new PMPoint(2, 2, 3.25)); obj13.userData.pointradii = 0.002; <!-- Vertex style --> obj13.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj13.userData.edgeindices = [1, 0]; <!-- Edge style --> obj13.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "unnamed__15"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(2, 2, 2.25)); obj14.userData.points.push(new PMPoint(3.25, 2, 2.25)); obj14.userData.pointradii = 0.002; <!-- Vertex style --> obj14.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj14.userData.edgeindices = [1, 0]; <!-- Edge style --> obj14.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "unnamed__16"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj15.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj15.userData.pointradii = 0.002; <!-- Vertex style --> obj15.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj15.userData.edgeindices = [1, 0]; <!-- Edge style --> obj15.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "unnamed__17"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj16.userData.points.push(new PMPoint(0, -0.5, 0)); obj16.userData.pointradii = 0.002; <!-- Vertex style --> obj16.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj16.userData.edgeindices = [1, 0]; <!-- Edge style --> obj16.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "unnamed__18"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(0, -0.5, 0)); obj17.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj17.userData.pointradii = 0.002; <!-- Vertex style --> obj17.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj17.userData.edgeindices = [1, 0]; <!-- Edge style --> obj17.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "unnamed__19"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(0, -0.5, 0)); obj18.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj18.userData.pointradii = 0.002; <!-- Vertex style --> obj18.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj18.userData.edgeindices = [1, 0]; <!-- Edge style --> obj18.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "unnamed__20"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj19.userData.points.push(new PMPoint(0.5, -0.5, 3.25)); obj19.userData.pointradii = 0.002; <!-- Vertex style --> obj19.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj19.userData.edgeindices = [1, 0]; <!-- Edge style --> obj19.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "unnamed__21"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj20.userData.points.push(new PMPoint(3.25, -0.5, 0.5)); obj20.userData.pointradii = 0.002; <!-- Vertex style --> obj20.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj20.userData.edgeindices = [1, 0]; <!-- Edge style --> obj20.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "unnamed__22"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj21.userData.points.push(new PMPoint(0.75, 1, 3.25)); obj21.userData.pointradii = 0.002; <!-- Vertex style --> obj21.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj21.userData.edgeindices = [1, 0]; <!-- Edge style --> obj21.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "unnamed__23"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(2, 2, 2.25)); obj22.userData.points.push(new PMPoint(2, 3.25, 2.25)); obj22.userData.pointradii = 0.002; <!-- Vertex style --> obj22.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj22.userData.edgeindices = [1, 0]; <!-- Edge style --> obj22.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "unnamed__24"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(-0.5, 0, 0)); obj23.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj23.userData.pointradii = 0.002; <!-- Vertex style --> obj23.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj23.userData.edgeindices = [1, 0]; <!-- Edge style --> obj23.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj23); scene.add(obj23); var obj24 = new THREE.Object3D(); obj24.name = "unnamed__25"; obj24.userData.explodable = 1; obj24.userData.points = []; obj24.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj24.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj24.userData.pointradii = 0.002; <!-- Vertex style --> obj24.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj24.userData.edgeindices = [1, 0]; <!-- Edge style --> obj24.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj24); scene.add(obj24); var obj25 = new THREE.Object3D(); obj25.name = "unnamed__26"; obj25.userData.explodable = 1; obj25.userData.points = []; obj25.userData.points.push(new PMPoint(0, 0, -0.5)); obj25.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj25.userData.pointradii = 0.002; <!-- Vertex style --> obj25.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj25.userData.edgeindices = [1, 0]; <!-- Edge style --> obj25.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj25); scene.add(obj25); var obj26 = new THREE.Object3D(); obj26.name = "unnamed__27"; obj26.userData.explodable = 1; obj26.userData.points = []; obj26.userData.points.push(new PMPoint(0, 0, -0.5)); obj26.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj26.userData.pointradii = 0.002; <!-- Vertex style --> obj26.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj26.userData.edgeindices = [1, 0]; <!-- Edge style --> obj26.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj26); scene.add(obj26); var obj27 = new THREE.Object3D(); obj27.name = "unnamed__28"; obj27.userData.explodable = 1; obj27.userData.points = []; obj27.userData.points.push(new PMPoint(0, 0, -0.5)); obj27.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj27.userData.pointradii = 0.002; <!-- Vertex style --> obj27.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj27.userData.edgeindices = [1, 0]; <!-- Edge style --> obj27.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj27); scene.add(obj27); var obj28 = new THREE.Object3D(); obj28.name = "unnamed__29"; obj28.userData.explodable = 1; obj28.userData.points = []; obj28.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj28.userData.points.push(new PMPoint(0.5, 3.25, -0.5)); obj28.userData.pointradii = 0.002; <!-- Vertex style --> obj28.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj28.userData.edgeindices = [1, 0]; <!-- Edge style --> obj28.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj28); scene.add(obj28); var obj29 = new THREE.Object3D(); obj29.name = "unnamed__30"; obj29.userData.explodable = 1; obj29.userData.points = []; obj29.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj29.userData.points.push(new PMPoint(3.25, 0.5, -0.5)); obj29.userData.pointradii = 0.002; <!-- Vertex style --> obj29.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj29.userData.edgeindices = [1, 0]; <!-- Edge style --> obj29.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj29); scene.add(obj29); var obj30 = new THREE.Object3D(); obj30.name = "unnamed__31"; obj30.userData.explodable = 1; obj30.userData.points = []; obj30.userData.points.push(new PMPoint(0.5, 1, 1)); obj30.userData.points.push(new PMPoint(-0.5, 0, 0)); obj30.userData.pointradii = 0.002; <!-- Vertex style --> obj30.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj30.userData.edgeindices = [1, 0]; <!-- Edge style --> obj30.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj30); scene.add(obj30); var obj31 = new THREE.Object3D(); obj31.name = "unnamed__32"; obj31.userData.explodable = 1; obj31.userData.points = []; obj31.userData.points.push(new PMPoint(0.5, 1, 1)); obj31.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj31.userData.pointradii = 0.002; <!-- Vertex style --> obj31.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj31.userData.edgeindices = [1, 0]; <!-- Edge style --> obj31.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj31); scene.add(obj31); var obj32 = new THREE.Object3D(); obj32.name = "unnamed__33"; obj32.userData.explodable = 1; obj32.userData.points = []; obj32.userData.points.push(new PMPoint(0.5, 1, 1)); obj32.userData.points.push(new PMPoint(0.5, 3.25, 1)); obj32.userData.pointradii = 0.002; <!-- Vertex style --> obj32.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj32.userData.edgeindices = [1, 0]; <!-- Edge style --> obj32.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj32); scene.add(obj32); var obj33 = new THREE.Object3D(); obj33.name = "unnamed__34"; obj33.userData.explodable = 1; obj33.userData.points = []; obj33.userData.points.push(new PMPoint(1, 0.75, 1)); obj33.userData.points.push(new PMPoint(0, -0.25, 0)); obj33.userData.pointradii = 0.002; <!-- Vertex style --> obj33.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj33.userData.edgeindices = [1, 0]; <!-- Edge style --> obj33.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj33); scene.add(obj33); var obj34 = new THREE.Object3D(); obj34.name = "unnamed__35"; obj34.userData.explodable = 1; obj34.userData.points = []; obj34.userData.points.push(new PMPoint(0, -0.25, 0)); obj34.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj34.userData.pointradii = 0.002; <!-- Vertex style --> obj34.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj34.userData.edgeindices = [1, 0]; <!-- Edge style --> obj34.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj34); scene.add(obj34); var obj35 = new THREE.Object3D(); obj35.name = "unnamed__36"; obj35.userData.explodable = 1; obj35.userData.points = []; obj35.userData.points.push(new PMPoint(0, -0.25, 0)); obj35.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj35.userData.pointradii = 0.002; <!-- Vertex style --> obj35.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj35.userData.edgeindices = [1, 0]; <!-- Edge style --> obj35.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj35); scene.add(obj35); var obj36 = new THREE.Object3D(); obj36.name = "unnamed__37"; obj36.userData.explodable = 1; obj36.userData.points = []; obj36.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj36.userData.points.push(new PMPoint(1, 1, 1.25)); obj36.userData.pointradii = 0.002; <!-- Vertex style --> obj36.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj36.userData.edgeindices = [1, 0]; <!-- Edge style --> obj36.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj36); scene.add(obj36); var obj37 = new THREE.Object3D(); obj37.name = "unnamed__38"; obj37.userData.explodable = 1; obj37.userData.points = []; obj37.userData.points.push(new PMPoint(1, 0.75, 1)); obj37.userData.points.push(new PMPoint(1, 1, 1.25)); obj37.userData.pointradii = 0.002; <!-- Vertex style --> obj37.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj37.userData.edgeindices = [1, 0]; <!-- Edge style --> obj37.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj37); scene.add(obj37); var obj38 = new THREE.Object3D(); obj38.name = "unnamed__39"; obj38.userData.explodable = 1; obj38.userData.points = []; obj38.userData.points.push(new PMPoint(1, 0.75, 1)); obj38.userData.points.push(new PMPoint(3.25, 0.75, 1)); obj38.userData.pointradii = 0.002; <!-- Vertex style --> obj38.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj38.userData.edgeindices = [1, 0]; <!-- Edge style --> obj38.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj38); scene.add(obj38); var obj39 = new THREE.Object3D(); obj39.name = "unnamed__40"; obj39.userData.explodable = 1; obj39.userData.points = []; obj39.userData.points.push(new PMPoint(1, 1, 1.25)); obj39.userData.points.push(new PMPoint(2, 2, 2.25)); obj39.userData.pointradii = 0.002; <!-- Vertex style --> obj39.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj39.userData.edgeindices = [1, 0]; <!-- Edge style --> obj39.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj39); scene.add(obj39); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_3'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_3').style.visibility = 'visible'; document.getElementById('showSettingsButton_3').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_3').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_3').style.visibility = 'hidden'; document.getElementById('showSettingsButton_3').style.visibility = 'visible'; document.getElementById('hideSettingsButton_3').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_3'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_3'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_3').oninput = triggerExplode; document.getElementById('explodeCheckbox_3').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_3').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_3').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_3').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_3'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_3'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_3').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_3').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_3').onchange = toggleDepthWrite; document.getElementById('changeRotationX_3').onchange = changeRotationX; document.getElementById('changeRotationY_3').onchange = changeRotationY; document.getElementById('changeRotationZ_3').onchange = changeRotationZ; document.getElementById('resetButton_3').onclick = resetScene; document.getElementById('rotationSpeedRange_3').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_3').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_3').onclick = showSettings; document.getElementById('hideSettingsButton_3').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_3').dispatchEvent(event); } else { document.getElementById('showSettingsButton_3').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> ==== B: exporting tropical curves from polymake ==== Unlike tropical hypersurfaces, preparing tropical curves for a 3d print is a bit more involved process. Since there is no satisfying way to solidify lines in default blender, we recommend using Polymake for solidification. For that, we need to decide on a bounding box, the planned size of the model, and the desired edge / vertex thickness. The first line below creates a bounding box based on the vertices of the tropical curve: <code perl> > $bFacets = polytope::bounding_box_facets($TSextic->affine_chart->VERTICES,offset=>1,surplus_k=>0.4, make_cube=>1); > $total_mm = 100; #planned size of the model > $edges_mm = 2; #desired edge diameter > $vertex_mm = 2; #desired vertex diameter > > $diam = $bFacets->[0]->[0] + $bFacets->[1]->[0]; > $vertex_diam = ($vertex_mm*$diam/$total_mm)/(1-$vertex_mm/$total_mm); > $edges_diam = ($edges_mm*$diam/$total_mm)/(1-$vertex_mm/$total_mm); > # this subroutine (sourced above) returns a set of VISUAL options that > # make sure the curve ends up with the the calculated dimensions in the x3d file > $curve_opts = x3dprint_curve_opts($vertex_diam,$edges_diam); > > # curves should be bounded beforehand to ensure all new vertices are also shown correctly > $bPolytope = new polytope::Polytope(FACETS=>$bFacets); > $bComplex = new fan::PolyhedralComplex(fan::check_fan_objects(($bPolytope))); > $TSexticBounded = pcom_common_ref($TSextic->affine_chart, $bComplex); > # export the curve > x3d($TSexticBounded->VISUAL($curve_opts),File=>$x3d_dir."TSextic.x3d"); </code> ==== Step 3: framing tropical curves in polymake ==== For 3d-printing we recommend crafting a frame which stabilizes the curve. The easiest way to craft a frame is using the intersection of the bounding box facets and one of the two tropical hypersurfaces which cut out the curve. <code perl> > $qFrame = pcom_common_ref($bPolytope->BOUNDED_COMPLEX,$TQuadric->affine_chart); > $cFrame = pcom_common_ref($bPolytope->BOUNDED_COMPLEX,$TCubic->affine_chart); > $qFrame->VISUAL; # visualizing frames > $cFrame->VISUAL; </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:36 2022 pcom: --> <html> <head> <meta charset=utf-8> <title>pcom:</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model66866260602 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_4' class='settings'> <div class=group id='explode_4'> <strong>Explode</strong> <input id='explodeRange_4' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_4' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_4' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_4' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_4' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_4' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_4'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_4'> x-axis</div> <div><input type='checkbox' id='changeRotationY_4'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_4'> z-axis</div> <button id='resetButton_4'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_4' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_4'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_4' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_4' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_4'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_4"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_4'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_4' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_4' > New tab<br> </form> <button id='takeScreenshot_4'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_4' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_4' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model66866260602"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model66866260602"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model66866260602'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(4.5, -0.625, -0.5)); obj0.userData.points.push(new PMPoint(4.5, -3.2, -3.075)); obj0.userData.pointradii = 0.02; <!-- Vertex style --> obj0.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj0.userData.pointlabels = ["0", "1"]; obj0.userData.edgeindices = [1, 0]; <!-- Edge style --> obj0.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(4.5, 2, 2.25)); obj1.userData.points.push(new PMPoint(4.5, 2, 4.5)); obj1.userData.pointradii = 0.02; <!-- Vertex style --> obj1.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj1.userData.pointlabels = ["2", "3"]; obj1.userData.edgeindices = [1, 0]; <!-- Edge style --> obj1.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(4.5, -0.5, -0.25)); obj2.userData.points.push(new PMPoint(4.5, -0.5, 4.5)); obj2.userData.pointradii = 0.02; <!-- Vertex style --> obj2.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj2.userData.pointlabels = ["4", "5"]; obj2.userData.edgeindices = [1, 0]; <!-- Edge style --> obj2.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(4.5, 2, 2.25)); obj3.userData.points.push(new PMPoint(4.5, 4.5, 2.25)); obj3.userData.pointradii = 0.02; <!-- Vertex style --> obj3.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj3.userData.pointlabels = ["2", "6"]; obj3.userData.edgeindices = [1, 0]; <!-- Edge style --> obj3.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(4.5, -0.625, -0.5)); obj4.userData.points.push(new PMPoint(4.5, -0.5, -0.25)); obj4.userData.pointradii = 0.02; <!-- Vertex style --> obj4.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj4.userData.pointlabels = ["0", "4"]; obj4.userData.edgeindices = [1, 0]; <!-- Edge style --> obj4.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(4.5, -0.625, -0.5)); obj5.userData.points.push(new PMPoint(4.5, 4.5, -0.5)); obj5.userData.pointradii = 0.02; <!-- Vertex style --> obj5.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj5.userData.pointlabels = ["0", "7"]; obj5.userData.edgeindices = [1, 0]; <!-- Edge style --> obj5.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "unnamed__7"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(4.5, 2, 2.25)); obj6.userData.points.push(new PMPoint(4.5, -0.5, -0.25)); obj6.userData.pointradii = 0.02; <!-- Vertex style --> obj6.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj6.userData.pointlabels = ["2", "4"]; obj6.userData.edgeindices = [1, 0]; <!-- Edge style --> obj6.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "unnamed__8"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(-3.2, -3.075, -2.95)); obj7.userData.points.push(new PMPoint(-3.2, -3.075, 4.5)); obj7.userData.pointradii = 0.02; <!-- Vertex style --> obj7.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj7.userData.pointlabels = ["8", "9"]; obj7.userData.edgeindices = [1, 0]; <!-- Edge style --> obj7.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "unnamed__9"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(-3.2, -3.075, -2.95)); obj8.userData.points.push(new PMPoint(-3.2, 4.5, -2.95)); obj8.userData.pointradii = 0.02; <!-- Vertex style --> obj8.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj8.userData.pointlabels = ["8", "10"]; obj8.userData.edgeindices = [1, 0]; <!-- Edge style --> obj8.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "unnamed__10"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(-3.2, -3.075, -2.95)); obj9.userData.points.push(new PMPoint(-3.2, -3.2, -3.075)); obj9.userData.pointradii = 0.02; <!-- Vertex style --> obj9.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj9.userData.pointlabels = ["8", "11"]; obj9.userData.edgeindices = [1, 0]; <!-- Edge style --> obj9.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "unnamed__11"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(-3.2, 4.5, -2.95)); obj10.userData.points.push(new PMPoint(-0.75, 4.5, -0.5)); obj10.userData.pointradii = 0.02; <!-- Vertex style --> obj10.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj10.userData.pointlabels = ["10", "12"]; obj10.userData.edgeindices = [1, 0]; <!-- Edge style --> obj10.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "unnamed__12"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(1.75, 4.5, 2.25)); obj11.userData.points.push(new PMPoint(1.75, 4.5, 4.5)); obj11.userData.pointradii = 0.02; <!-- Vertex style --> obj11.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj11.userData.pointlabels = ["13", "14"]; obj11.userData.edgeindices = [1, 0]; <!-- Edge style --> obj11.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "unnamed__13"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(-0.5, 4.5, 0)); obj12.userData.points.push(new PMPoint(-0.5, 4.5, 4.5)); obj12.userData.pointradii = 0.02; <!-- Vertex style --> obj12.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj12.userData.pointlabels = ["15", "16"]; obj12.userData.edgeindices = [1, 0]; <!-- Edge style --> obj12.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "unnamed__14"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(4.5, 4.5, 2.25)); obj13.userData.points.push(new PMPoint(1.75, 4.5, 2.25)); obj13.userData.pointradii = 0.02; <!-- Vertex style --> obj13.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj13.userData.pointlabels = ["6", "13"]; obj13.userData.edgeindices = [1, 0]; <!-- Edge style --> obj13.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "unnamed__15"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(-0.75, 4.5, -0.5)); obj14.userData.points.push(new PMPoint(-0.5, 4.5, 0)); obj14.userData.pointradii = 0.02; <!-- Vertex style --> obj14.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj14.userData.pointlabels = ["12", "15"]; obj14.userData.edgeindices = [1, 0]; <!-- Edge style --> obj14.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "unnamed__16"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(4.5, 4.5, -0.5)); obj15.userData.points.push(new PMPoint(-0.75, 4.5, -0.5)); obj15.userData.pointradii = 0.02; <!-- Vertex style --> obj15.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj15.userData.pointlabels = ["7", "12"]; obj15.userData.edgeindices = [1, 0]; <!-- Edge style --> obj15.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "unnamed__17"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(1.75, 4.5, 2.25)); obj16.userData.points.push(new PMPoint(-0.5, 4.5, 0)); obj16.userData.pointradii = 0.02; <!-- Vertex style --> obj16.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj16.userData.pointlabels = ["13", "15"]; obj16.userData.edgeindices = [1, 0]; <!-- Edge style --> obj16.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "unnamed__18"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(4.5, -3.2, -3.075)); obj17.userData.points.push(new PMPoint(-3.2, -3.2, -3.075)); obj17.userData.pointradii = 0.02; <!-- Vertex style --> obj17.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj17.userData.pointlabels = ["1", "11"]; obj17.userData.edgeindices = [1, 0]; <!-- Edge style --> obj17.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "unnamed__19"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(-3.2, -3.075, 4.5)); obj18.userData.points.push(new PMPoint(-0.625, -0.5, 4.5)); obj18.userData.pointradii = 0.02; <!-- Vertex style --> obj18.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj18.userData.pointlabels = ["9", "17"]; obj18.userData.edgeindices = [1, 0]; <!-- Edge style --> obj18.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "unnamed__20"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(1.75, 4.5, 4.5)); obj19.userData.points.push(new PMPoint(1.75, 2, 4.5)); obj19.userData.pointradii = 0.02; <!-- Vertex style --> obj19.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj19.userData.pointlabels = ["14", "18"]; obj19.userData.edgeindices = [1, 0]; <!-- Edge style --> obj19.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "unnamed__21"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(-0.5, 4.5, 4.5)); obj20.userData.points.push(new PMPoint(-0.5, -0.25, 4.5)); obj20.userData.pointradii = 0.02; <!-- Vertex style --> obj20.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj20.userData.pointlabels = ["16", "19"]; obj20.userData.edgeindices = [1, 0]; <!-- Edge style --> obj20.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "unnamed__22"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(4.5, 2, 4.5)); obj21.userData.points.push(new PMPoint(1.75, 2, 4.5)); obj21.userData.pointradii = 0.02; <!-- Vertex style --> obj21.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj21.userData.pointlabels = ["3", "18"]; obj21.userData.edgeindices = [1, 0]; <!-- Edge style --> obj21.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "unnamed__23"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(-0.625, -0.5, 4.5)); obj22.userData.points.push(new PMPoint(-0.5, -0.25, 4.5)); obj22.userData.pointradii = 0.02; <!-- Vertex style --> obj22.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj22.userData.pointlabels = ["17", "19"]; obj22.userData.edgeindices = [1, 0]; <!-- Edge style --> obj22.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "unnamed__24"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(4.5, -0.5, 4.5)); obj23.userData.points.push(new PMPoint(-0.625, -0.5, 4.5)); obj23.userData.pointradii = 0.02; <!-- Vertex style --> obj23.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj23.userData.pointlabels = ["5", "17"]; obj23.userData.edgeindices = [1, 0]; <!-- Edge style --> obj23.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj23); scene.add(obj23); var obj24 = new THREE.Object3D(); obj24.name = "unnamed__25"; obj24.userData.explodable = 1; obj24.userData.points = []; obj24.userData.points.push(new PMPoint(1.75, 2, 4.5)); obj24.userData.points.push(new PMPoint(-0.5, -0.25, 4.5)); obj24.userData.pointradii = 0.02; <!-- Vertex style --> obj24.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj24.userData.pointlabels = ["18", "19"]; obj24.userData.edgeindices = [1, 0]; <!-- Edge style --> obj24.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj24); scene.add(obj24); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_4'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_4').style.visibility = 'visible'; document.getElementById('showSettingsButton_4').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_4').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_4').style.visibility = 'hidden'; document.getElementById('showSettingsButton_4').style.visibility = 'visible'; document.getElementById('hideSettingsButton_4').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_4'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_4'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_4').oninput = triggerExplode; document.getElementById('explodeCheckbox_4').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_4').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_4').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_4').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_4'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_4'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_4').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_4').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_4').onchange = toggleDepthWrite; document.getElementById('changeRotationX_4').onchange = changeRotationX; document.getElementById('changeRotationY_4').onchange = changeRotationY; document.getElementById('changeRotationZ_4').onchange = changeRotationZ; document.getElementById('resetButton_4').onclick = resetScene; document.getElementById('rotationSpeedRange_4').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_4').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_4').onclick = showSettings; document.getElementById('hideSettingsButton_4').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_4').dispatchEvent(event); } else { document.getElementById('showSettingsButton_4').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:39 2022 pcom: --> <html> <head> <meta charset=utf-8> <title>pcom:</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model82253920533 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_5' class='settings'> <div class=group id='explode_5'> <strong>Explode</strong> <input id='explodeRange_5' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_5' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_5' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_5' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_5' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_5' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_5'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_5'> x-axis</div> <div><input type='checkbox' id='changeRotationY_5'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_5'> z-axis</div> <button id='resetButton_5'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_5' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_5'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_5' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_5' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_5'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_5"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_5'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_5' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_5' > New tab<br> </form> <button id='takeScreenshot_5'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_5' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_5' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model82253920533"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model82253920533"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model82253920533'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(4.5, 2, 2)); obj0.userData.points.push(new PMPoint(4.5, 2, 4.5)); obj0.userData.pointradii = 0.02; <!-- Vertex style --> obj0.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj0.userData.pointlabels = ["0", "1"]; obj0.userData.edgeindices = [1, 0]; <!-- Edge style --> obj0.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(4.5, 0, 1)); obj1.userData.points.push(new PMPoint(4.5, 1, 1)); obj1.userData.pointradii = 0.02; <!-- Vertex style --> obj1.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj1.userData.pointlabels = ["2", "3"]; obj1.userData.edgeindices = [1, 0]; <!-- Edge style --> obj1.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(4.5, 2, 2)); obj2.userData.points.push(new PMPoint(4.5, 4.5, 2)); obj2.userData.pointradii = 0.02; <!-- Vertex style --> obj2.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj2.userData.pointlabels = ["0", "4"]; obj2.userData.edgeindices = [1, 0]; <!-- Edge style --> obj2.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(4.5, 1, 1)); obj3.userData.points.push(new PMPoint(4.5, 1, 0)); obj3.userData.pointradii = 0.02; <!-- Vertex style --> obj3.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj3.userData.pointlabels = ["3", "5"]; obj3.userData.edgeindices = [1, 0]; <!-- Edge style --> obj3.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(4.5, 2, 2)); obj4.userData.points.push(new PMPoint(4.5, 1, 1)); obj4.userData.pointradii = 0.02; <!-- Vertex style --> obj4.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj4.userData.pointlabels = ["0", "3"]; obj4.userData.edgeindices = [1, 0]; <!-- Edge style --> obj4.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(4.5, -2, 0)); obj5.userData.points.push(new PMPoint(4.5, -2, 4.5)); obj5.userData.pointradii = 0.02; <!-- Vertex style --> obj5.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj5.userData.pointlabels = ["6", "7"]; obj5.userData.edgeindices = [1, 0]; <!-- Edge style --> obj5.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "unnamed__7"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(4.5, 0, 1)); obj6.userData.points.push(new PMPoint(4.5, -1, 0)); obj6.userData.pointradii = 0.02; <!-- Vertex style --> obj6.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj6.userData.pointlabels = ["2", "8"]; obj6.userData.edgeindices = [1, 0]; <!-- Edge style --> obj6.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "unnamed__8"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(4.5, 0, 1)); obj7.userData.points.push(new PMPoint(4.5, 0, 4.5)); obj7.userData.pointradii = 0.02; <!-- Vertex style --> obj7.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj7.userData.pointlabels = ["2", "9"]; obj7.userData.edgeindices = [1, 0]; <!-- Edge style --> obj7.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "unnamed__9"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(4.5, 0, -2)); obj8.userData.points.push(new PMPoint(4.5, 4.5, -2)); obj8.userData.pointradii = 0.02; <!-- Vertex style --> obj8.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj8.userData.pointlabels = ["10", "11"]; obj8.userData.edgeindices = [1, 0]; <!-- Edge style --> obj8.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "unnamed__10"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(4.5, 1, 0)); obj9.userData.points.push(new PMPoint(4.5, 0, -1)); obj9.userData.pointradii = 0.02; <!-- Vertex style --> obj9.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj9.userData.pointlabels = ["5", "12"]; obj9.userData.edgeindices = [1, 0]; <!-- Edge style --> obj9.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "unnamed__11"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(4.5, 1, 0)); obj10.userData.points.push(new PMPoint(4.5, 4.5, 0)); obj10.userData.pointradii = 0.02; <!-- Vertex style --> obj10.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj10.userData.pointlabels = ["5", "13"]; obj10.userData.edgeindices = [1, 0]; <!-- Edge style --> obj10.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "unnamed__12"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(4.5, -2, 0)); obj11.userData.points.push(new PMPoint(4.5, -3.2, -1.2)); obj11.userData.pointradii = 0.02; <!-- Vertex style --> obj11.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj11.userData.pointlabels = ["6", "14"]; obj11.userData.edgeindices = [1, 0]; <!-- Edge style --> obj11.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "unnamed__13"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(4.5, -1, 0)); obj12.userData.points.push(new PMPoint(4.5, -1, -1)); obj12.userData.pointradii = 0.02; <!-- Vertex style --> obj12.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj12.userData.pointlabels = ["8", "15"]; obj12.userData.edgeindices = [1, 0]; <!-- Edge style --> obj12.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "unnamed__14"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(4.5, -2, 0)); obj13.userData.points.push(new PMPoint(4.5, -1, 0)); obj13.userData.pointradii = 0.02; <!-- Vertex style --> obj13.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj13.userData.pointlabels = ["6", "8"]; obj13.userData.edgeindices = [1, 0]; <!-- Edge style --> obj13.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "unnamed__15"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(4.5, 0, -2)); obj14.userData.points.push(new PMPoint(4.5, -1.2, -3.2)); obj14.userData.pointradii = 0.02; <!-- Vertex style --> obj14.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj14.userData.pointlabels = ["10", "16"]; obj14.userData.edgeindices = [1, 0]; <!-- Edge style --> obj14.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "unnamed__16"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(4.5, 0, -1)); obj15.userData.points.push(new PMPoint(4.5, -1, -1)); obj15.userData.pointradii = 0.02; <!-- Vertex style --> obj15.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj15.userData.pointlabels = ["12", "15"]; obj15.userData.edgeindices = [1, 0]; <!-- Edge style --> obj15.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "unnamed__17"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(4.5, 0, -2)); obj16.userData.points.push(new PMPoint(4.5, 0, -1)); obj16.userData.pointradii = 0.02; <!-- Vertex style --> obj16.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj16.userData.pointlabels = ["10", "12"]; obj16.userData.edgeindices = [1, 0]; <!-- Edge style --> obj16.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "unnamed__18"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(4.5, -1, -1)); obj17.userData.points.push(new PMPoint(4.5, -3.2, -3.2)); obj17.userData.pointradii = 0.02; <!-- Vertex style --> obj17.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj17.userData.pointlabels = ["15", "17"]; obj17.userData.edgeindices = [1, 0]; <!-- Edge style --> obj17.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "unnamed__19"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(-3.2, -1.2, -1.2)); obj18.userData.points.push(new PMPoint(-3.2, -1.2, 4.5)); obj18.userData.pointradii = 0.02; <!-- Vertex style --> obj18.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj18.userData.pointlabels = ["18", "19"]; obj18.userData.edgeindices = [1, 0]; <!-- Edge style --> obj18.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "unnamed__20"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(-3.2, -3.2, -2.2)); obj19.userData.points.push(new PMPoint(-3.2, -2.2, -2.2)); obj19.userData.pointradii = 0.02; <!-- Vertex style --> obj19.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj19.userData.pointlabels = ["20", "21"]; obj19.userData.edgeindices = [1, 0]; <!-- Edge style --> obj19.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "unnamed__21"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(-3.2, -1.2, -1.2)); obj20.userData.points.push(new PMPoint(-3.2, 4.5, -1.2)); obj20.userData.pointradii = 0.02; <!-- Vertex style --> obj20.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj20.userData.pointlabels = ["18", "22"]; obj20.userData.edgeindices = [1, 0]; <!-- Edge style --> obj20.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "unnamed__22"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(-3.2, -2.2, -2.2)); obj21.userData.points.push(new PMPoint(-3.2, -2.2, -3.2)); obj21.userData.pointradii = 0.02; <!-- Vertex style --> obj21.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj21.userData.pointlabels = ["21", "23"]; obj21.userData.edgeindices = [1, 0]; <!-- Edge style --> obj21.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "unnamed__23"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(-3.2, -1.2, -1.2)); obj22.userData.points.push(new PMPoint(-3.2, -2.2, -2.2)); obj22.userData.pointradii = 0.02; <!-- Vertex style --> obj22.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj22.userData.pointlabels = ["18", "21"]; obj22.userData.edgeindices = [1, 0]; <!-- Edge style --> obj22.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "unnamed__24"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(-3.2, -3.2, -2.2)); obj23.userData.points.push(new PMPoint(-3.2, -3.2, 4.5)); obj23.userData.pointradii = 0.02; <!-- Vertex style --> obj23.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj23.userData.pointlabels = ["20", "24"]; obj23.userData.edgeindices = [1, 0]; <!-- Edge style --> obj23.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj23); scene.add(obj23); var obj24 = new THREE.Object3D(); obj24.name = "unnamed__25"; obj24.userData.explodable = 1; obj24.userData.points = []; obj24.userData.points.push(new PMPoint(-3.2, -2.2, -3.2)); obj24.userData.points.push(new PMPoint(-3.2, 4.5, -3.2)); obj24.userData.pointradii = 0.02; <!-- Vertex style --> obj24.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj24.userData.pointlabels = ["23", "25"]; obj24.userData.edgeindices = [1, 0]; <!-- Edge style --> obj24.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj24); scene.add(obj24); var obj25 = new THREE.Object3D(); obj25.name = "unnamed__26"; obj25.userData.explodable = 1; obj25.userData.points = []; obj25.userData.points.push(new PMPoint(2, 4.5, 2)); obj25.userData.points.push(new PMPoint(2, 4.5, 4.5)); obj25.userData.pointradii = 0.02; <!-- Vertex style --> obj25.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj25.userData.pointlabels = ["26", "27"]; obj25.userData.edgeindices = [1, 0]; <!-- Edge style --> obj25.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj25); scene.add(obj25); var obj26 = new THREE.Object3D(); obj26.name = "unnamed__27"; obj26.userData.explodable = 1; obj26.userData.points = []; obj26.userData.points.push(new PMPoint(0, 4.5, 1)); obj26.userData.points.push(new PMPoint(1, 4.5, 1)); obj26.userData.pointradii = 0.02; <!-- Vertex style --> obj26.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj26.userData.pointlabels = ["28", "29"]; obj26.userData.edgeindices = [1, 0]; <!-- Edge style --> obj26.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj26); scene.add(obj26); var obj27 = new THREE.Object3D(); obj27.name = "unnamed__28"; obj27.userData.explodable = 1; obj27.userData.points = []; obj27.userData.points.push(new PMPoint(4.5, 4.5, 2)); obj27.userData.points.push(new PMPoint(2, 4.5, 2)); obj27.userData.pointradii = 0.02; <!-- Vertex style --> obj27.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj27.userData.pointlabels = ["4", "26"]; obj27.userData.edgeindices = [1, 0]; <!-- Edge style --> obj27.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj27); scene.add(obj27); var obj28 = new THREE.Object3D(); obj28.name = "unnamed__29"; obj28.userData.explodable = 1; obj28.userData.points = []; obj28.userData.points.push(new PMPoint(1, 4.5, 1)); obj28.userData.points.push(new PMPoint(1, 4.5, 0)); obj28.userData.pointradii = 0.02; <!-- Vertex style --> obj28.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj28.userData.pointlabels = ["29", "30"]; obj28.userData.edgeindices = [1, 0]; <!-- Edge style --> obj28.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj28); scene.add(obj28); var obj29 = new THREE.Object3D(); obj29.name = "unnamed__30"; obj29.userData.explodable = 1; obj29.userData.points = []; obj29.userData.points.push(new PMPoint(2, 4.5, 2)); obj29.userData.points.push(new PMPoint(1, 4.5, 1)); obj29.userData.pointradii = 0.02; <!-- Vertex style --> obj29.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj29.userData.pointlabels = ["26", "29"]; obj29.userData.edgeindices = [1, 0]; <!-- Edge style --> obj29.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj29); scene.add(obj29); var obj30 = new THREE.Object3D(); obj30.name = "unnamed__31"; obj30.userData.explodable = 1; obj30.userData.points = []; obj30.userData.points.push(new PMPoint(-2, 4.5, 0)); obj30.userData.points.push(new PMPoint(-2, 4.5, 4.5)); obj30.userData.pointradii = 0.02; <!-- Vertex style --> obj30.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj30.userData.pointlabels = ["31", "32"]; obj30.userData.edgeindices = [1, 0]; <!-- Edge style --> obj30.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj30); scene.add(obj30); var obj31 = new THREE.Object3D(); obj31.name = "unnamed__32"; obj31.userData.explodable = 1; obj31.userData.points = []; obj31.userData.points.push(new PMPoint(0, 4.5, 1)); obj31.userData.points.push(new PMPoint(-1, 4.5, 0)); obj31.userData.pointradii = 0.02; <!-- Vertex style --> obj31.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj31.userData.pointlabels = ["28", "33"]; obj31.userData.edgeindices = [1, 0]; <!-- Edge style --> obj31.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj31); scene.add(obj31); var obj32 = new THREE.Object3D(); obj32.name = "unnamed__33"; obj32.userData.explodable = 1; obj32.userData.points = []; obj32.userData.points.push(new PMPoint(0, 4.5, 1)); obj32.userData.points.push(new PMPoint(0, 4.5, 4.5)); obj32.userData.pointradii = 0.02; <!-- Vertex style --> obj32.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj32.userData.pointlabels = ["28", "34"]; obj32.userData.edgeindices = [1, 0]; <!-- Edge style --> obj32.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj32); scene.add(obj32); var obj33 = new THREE.Object3D(); obj33.name = "unnamed__34"; obj33.userData.explodable = 1; obj33.userData.points = []; obj33.userData.points.push(new PMPoint(4.5, 4.5, -2)); obj33.userData.points.push(new PMPoint(0, 4.5, -2)); obj33.userData.pointradii = 0.02; <!-- Vertex style --> obj33.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj33.userData.pointlabels = ["11", "35"]; obj33.userData.edgeindices = [1, 0]; <!-- Edge style --> obj33.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj33); scene.add(obj33); var obj34 = new THREE.Object3D(); obj34.name = "unnamed__35"; obj34.userData.explodable = 1; obj34.userData.points = []; obj34.userData.points.push(new PMPoint(1, 4.5, 0)); obj34.userData.points.push(new PMPoint(0, 4.5, -1)); obj34.userData.pointradii = 0.02; <!-- Vertex style --> obj34.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj34.userData.pointlabels = ["30", "36"]; obj34.userData.edgeindices = [1, 0]; <!-- Edge style --> obj34.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj34); scene.add(obj34); var obj35 = new THREE.Object3D(); obj35.name = "unnamed__36"; obj35.userData.explodable = 1; obj35.userData.points = []; obj35.userData.points.push(new PMPoint(4.5, 4.5, 0)); obj35.userData.points.push(new PMPoint(1, 4.5, 0)); obj35.userData.pointradii = 0.02; <!-- Vertex style --> obj35.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj35.userData.pointlabels = ["13", "30"]; obj35.userData.edgeindices = [1, 0]; <!-- Edge style --> obj35.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj35); scene.add(obj35); var obj36 = new THREE.Object3D(); obj36.name = "unnamed__37"; obj36.userData.explodable = 1; obj36.userData.points = []; obj36.userData.points.push(new PMPoint(-3.2, 4.5, -1.2)); obj36.userData.points.push(new PMPoint(-2, 4.5, 0)); obj36.userData.pointradii = 0.02; <!-- Vertex style --> obj36.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj36.userData.pointlabels = ["22", "31"]; obj36.userData.edgeindices = [1, 0]; <!-- Edge style --> obj36.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj36); scene.add(obj36); var obj37 = new THREE.Object3D(); obj37.name = "unnamed__38"; obj37.userData.explodable = 1; obj37.userData.points = []; obj37.userData.points.push(new PMPoint(-1, 4.5, 0)); obj37.userData.points.push(new PMPoint(-1, 4.5, -1)); obj37.userData.pointradii = 0.02; <!-- Vertex style --> obj37.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj37.userData.pointlabels = ["33", "37"]; obj37.userData.edgeindices = [1, 0]; <!-- Edge style --> obj37.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj37); scene.add(obj37); var obj38 = new THREE.Object3D(); obj38.name = "unnamed__39"; obj38.userData.explodable = 1; obj38.userData.points = []; obj38.userData.points.push(new PMPoint(-2, 4.5, 0)); obj38.userData.points.push(new PMPoint(-1, 4.5, 0)); obj38.userData.pointradii = 0.02; <!-- Vertex style --> obj38.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj38.userData.pointlabels = ["31", "33"]; obj38.userData.edgeindices = [1, 0]; <!-- Edge style --> obj38.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj38); scene.add(obj38); var obj39 = new THREE.Object3D(); obj39.name = "unnamed__40"; obj39.userData.explodable = 1; obj39.userData.points = []; obj39.userData.points.push(new PMPoint(0, 4.5, -2)); obj39.userData.points.push(new PMPoint(-1.2, 4.5, -3.2)); obj39.userData.pointradii = 0.02; <!-- Vertex style --> obj39.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj39.userData.pointlabels = ["35", "38"]; obj39.userData.edgeindices = [1, 0]; <!-- Edge style --> obj39.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj39); scene.add(obj39); var obj40 = new THREE.Object3D(); obj40.name = "unnamed__41"; obj40.userData.explodable = 1; obj40.userData.points = []; obj40.userData.points.push(new PMPoint(0, 4.5, -1)); obj40.userData.points.push(new PMPoint(-1, 4.5, -1)); obj40.userData.pointradii = 0.02; <!-- Vertex style --> obj40.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj40.userData.pointlabels = ["36", "37"]; obj40.userData.edgeindices = [1, 0]; <!-- Edge style --> obj40.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj40); scene.add(obj40); var obj41 = new THREE.Object3D(); obj41.name = "unnamed__42"; obj41.userData.explodable = 1; obj41.userData.points = []; obj41.userData.points.push(new PMPoint(0, 4.5, -2)); obj41.userData.points.push(new PMPoint(0, 4.5, -1)); obj41.userData.pointradii = 0.02; <!-- Vertex style --> obj41.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj41.userData.pointlabels = ["35", "36"]; obj41.userData.edgeindices = [1, 0]; <!-- Edge style --> obj41.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj41); scene.add(obj41); var obj42 = new THREE.Object3D(); obj42.name = "unnamed__43"; obj42.userData.explodable = 1; obj42.userData.points = []; obj42.userData.points.push(new PMPoint(-3.2, 4.5, -3.2)); obj42.userData.points.push(new PMPoint(-1, 4.5, -1)); obj42.userData.pointradii = 0.02; <!-- Vertex style --> obj42.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj42.userData.pointlabels = ["25", "37"]; obj42.userData.edgeindices = [1, 0]; <!-- Edge style --> obj42.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj42); scene.add(obj42); var obj43 = new THREE.Object3D(); obj43.name = "unnamed__44"; obj43.userData.explodable = 1; obj43.userData.points = []; obj43.userData.points.push(new PMPoint(-1.2, -3.2, -1.2)); obj43.userData.points.push(new PMPoint(-1.2, -3.2, 4.5)); obj43.userData.pointradii = 0.02; <!-- Vertex style --> obj43.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj43.userData.pointlabels = ["39", "40"]; obj43.userData.edgeindices = [1, 0]; <!-- Edge style --> obj43.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj43); scene.add(obj43); var obj44 = new THREE.Object3D(); obj44.name = "unnamed__45"; obj44.userData.explodable = 1; obj44.userData.points = []; obj44.userData.points.push(new PMPoint(-3.2, -3.2, -2.2)); obj44.userData.points.push(new PMPoint(-2.2, -3.2, -2.2)); obj44.userData.pointradii = 0.02; <!-- Vertex style --> obj44.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj44.userData.pointlabels = ["20", "41"]; obj44.userData.edgeindices = [1, 0]; <!-- Edge style --> obj44.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj44); scene.add(obj44); var obj45 = new THREE.Object3D(); obj45.name = "unnamed__46"; obj45.userData.explodable = 1; obj45.userData.points = []; obj45.userData.points.push(new PMPoint(4.5, -3.2, -1.2)); obj45.userData.points.push(new PMPoint(-1.2, -3.2, -1.2)); obj45.userData.pointradii = 0.02; <!-- Vertex style --> obj45.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj45.userData.pointlabels = ["14", "39"]; obj45.userData.edgeindices = [1, 0]; <!-- Edge style --> obj45.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj45); scene.add(obj45); var obj46 = new THREE.Object3D(); obj46.name = "unnamed__47"; obj46.userData.explodable = 1; obj46.userData.points = []; obj46.userData.points.push(new PMPoint(-2.2, -3.2, -2.2)); obj46.userData.points.push(new PMPoint(-2.2, -3.2, -3.2)); obj46.userData.pointradii = 0.02; <!-- Vertex style --> obj46.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj46.userData.pointlabels = ["41", "42"]; obj46.userData.edgeindices = [1, 0]; <!-- Edge style --> obj46.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj46); scene.add(obj46); var obj47 = new THREE.Object3D(); obj47.name = "unnamed__48"; obj47.userData.explodable = 1; obj47.userData.points = []; obj47.userData.points.push(new PMPoint(-1.2, -3.2, -1.2)); obj47.userData.points.push(new PMPoint(-2.2, -3.2, -2.2)); obj47.userData.pointradii = 0.02; <!-- Vertex style --> obj47.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj47.userData.pointlabels = ["39", "41"]; obj47.userData.edgeindices = [1, 0]; <!-- Edge style --> obj47.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj47); scene.add(obj47); var obj48 = new THREE.Object3D(); obj48.name = "unnamed__49"; obj48.userData.explodable = 1; obj48.userData.points = []; obj48.userData.points.push(new PMPoint(4.5, -3.2, -3.2)); obj48.userData.points.push(new PMPoint(-2.2, -3.2, -3.2)); obj48.userData.pointradii = 0.02; <!-- Vertex style --> obj48.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj48.userData.pointlabels = ["17", "42"]; obj48.userData.edgeindices = [1, 0]; <!-- Edge style --> obj48.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj48); scene.add(obj48); var obj49 = new THREE.Object3D(); obj49.name = "unnamed__50"; obj49.userData.explodable = 1; obj49.userData.points = []; obj49.userData.points.push(new PMPoint(2, 4.5, 4.5)); obj49.userData.points.push(new PMPoint(2, 2, 4.5)); obj49.userData.pointradii = 0.02; <!-- Vertex style --> obj49.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj49.userData.pointlabels = ["27", "43"]; obj49.userData.edgeindices = [1, 0]; <!-- Edge style --> obj49.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj49); scene.add(obj49); var obj50 = new THREE.Object3D(); obj50.name = "unnamed__51"; obj50.userData.explodable = 1; obj50.userData.points = []; obj50.userData.points.push(new PMPoint(0, 1, 4.5)); obj50.userData.points.push(new PMPoint(1, 1, 4.5)); obj50.userData.pointradii = 0.02; <!-- Vertex style --> obj50.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj50.userData.pointlabels = ["44", "45"]; obj50.userData.edgeindices = [1, 0]; <!-- Edge style --> obj50.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj50); scene.add(obj50); var obj51 = new THREE.Object3D(); obj51.name = "unnamed__52"; obj51.userData.explodable = 1; obj51.userData.points = []; obj51.userData.points.push(new PMPoint(4.5, 2, 4.5)); obj51.userData.points.push(new PMPoint(2, 2, 4.5)); obj51.userData.pointradii = 0.02; <!-- Vertex style --> obj51.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj51.userData.pointlabels = ["1", "43"]; obj51.userData.edgeindices = [1, 0]; <!-- Edge style --> obj51.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj51); scene.add(obj51); var obj52 = new THREE.Object3D(); obj52.name = "unnamed__53"; obj52.userData.explodable = 1; obj52.userData.points = []; obj52.userData.points.push(new PMPoint(1, 1, 4.5)); obj52.userData.points.push(new PMPoint(1, 0, 4.5)); obj52.userData.pointradii = 0.02; <!-- Vertex style --> obj52.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj52.userData.pointlabels = ["45", "46"]; obj52.userData.edgeindices = [1, 0]; <!-- Edge style --> obj52.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj52); scene.add(obj52); var obj53 = new THREE.Object3D(); obj53.name = "unnamed__54"; obj53.userData.explodable = 1; obj53.userData.points = []; obj53.userData.points.push(new PMPoint(2, 2, 4.5)); obj53.userData.points.push(new PMPoint(1, 1, 4.5)); obj53.userData.pointradii = 0.02; <!-- Vertex style --> obj53.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj53.userData.pointlabels = ["43", "45"]; obj53.userData.edgeindices = [1, 0]; <!-- Edge style --> obj53.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj53); scene.add(obj53); var obj54 = new THREE.Object3D(); obj54.name = "unnamed__55"; obj54.userData.explodable = 1; obj54.userData.points = []; obj54.userData.points.push(new PMPoint(-2, 4.5, 4.5)); obj54.userData.points.push(new PMPoint(-2, 0, 4.5)); obj54.userData.pointradii = 0.02; <!-- Vertex style --> obj54.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj54.userData.pointlabels = ["32", "47"]; obj54.userData.edgeindices = [1, 0]; <!-- Edge style --> obj54.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj54); scene.add(obj54); var obj55 = new THREE.Object3D(); obj55.name = "unnamed__56"; obj55.userData.explodable = 1; obj55.userData.points = []; obj55.userData.points.push(new PMPoint(0, 1, 4.5)); obj55.userData.points.push(new PMPoint(-1, 0, 4.5)); obj55.userData.pointradii = 0.02; <!-- Vertex style --> obj55.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj55.userData.pointlabels = ["44", "48"]; obj55.userData.edgeindices = [1, 0]; <!-- Edge style --> obj55.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj55); scene.add(obj55); var obj56 = new THREE.Object3D(); obj56.name = "unnamed__57"; obj56.userData.explodable = 1; obj56.userData.points = []; obj56.userData.points.push(new PMPoint(0, 4.5, 4.5)); obj56.userData.points.push(new PMPoint(0, 1, 4.5)); obj56.userData.pointradii = 0.02; <!-- Vertex style --> obj56.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj56.userData.pointlabels = ["34", "44"]; obj56.userData.edgeindices = [1, 0]; <!-- Edge style --> obj56.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj56); scene.add(obj56); var obj57 = new THREE.Object3D(); obj57.name = "unnamed__58"; obj57.userData.explodable = 1; obj57.userData.points = []; obj57.userData.points.push(new PMPoint(4.5, -2, 4.5)); obj57.userData.points.push(new PMPoint(0, -2, 4.5)); obj57.userData.pointradii = 0.02; <!-- Vertex style --> obj57.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj57.userData.pointlabels = ["7", "49"]; obj57.userData.edgeindices = [1, 0]; <!-- Edge style --> obj57.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj57); scene.add(obj57); var obj58 = new THREE.Object3D(); obj58.name = "unnamed__59"; obj58.userData.explodable = 1; obj58.userData.points = []; obj58.userData.points.push(new PMPoint(1, 0, 4.5)); obj58.userData.points.push(new PMPoint(0, -1, 4.5)); obj58.userData.pointradii = 0.02; <!-- Vertex style --> obj58.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj58.userData.pointlabels = ["46", "50"]; obj58.userData.edgeindices = [1, 0]; <!-- Edge style --> obj58.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj58); scene.add(obj58); var obj59 = new THREE.Object3D(); obj59.name = "unnamed__60"; obj59.userData.explodable = 1; obj59.userData.points = []; obj59.userData.points.push(new PMPoint(4.5, 0, 4.5)); obj59.userData.points.push(new PMPoint(1, 0, 4.5)); obj59.userData.pointradii = 0.02; <!-- Vertex style --> obj59.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj59.userData.pointlabels = ["9", "46"]; obj59.userData.edgeindices = [1, 0]; <!-- Edge style --> obj59.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj59); scene.add(obj59); var obj60 = new THREE.Object3D(); obj60.name = "unnamed__61"; obj60.userData.explodable = 1; obj60.userData.points = []; obj60.userData.points.push(new PMPoint(-3.2, -1.2, 4.5)); obj60.userData.points.push(new PMPoint(-2, 0, 4.5)); obj60.userData.pointradii = 0.02; <!-- Vertex style --> obj60.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj60.userData.pointlabels = ["19", "47"]; obj60.userData.edgeindices = [1, 0]; <!-- Edge style --> obj60.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj60); scene.add(obj60); var obj61 = new THREE.Object3D(); obj61.name = "unnamed__62"; obj61.userData.explodable = 1; obj61.userData.points = []; obj61.userData.points.push(new PMPoint(-1, 0, 4.5)); obj61.userData.points.push(new PMPoint(-1, -1, 4.5)); obj61.userData.pointradii = 0.02; <!-- Vertex style --> obj61.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj61.userData.pointlabels = ["48", "51"]; obj61.userData.edgeindices = [1, 0]; <!-- Edge style --> obj61.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj61); scene.add(obj61); var obj62 = new THREE.Object3D(); obj62.name = "unnamed__63"; obj62.userData.explodable = 1; obj62.userData.points = []; obj62.userData.points.push(new PMPoint(-2, 0, 4.5)); obj62.userData.points.push(new PMPoint(-1, 0, 4.5)); obj62.userData.pointradii = 0.02; <!-- Vertex style --> obj62.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj62.userData.pointlabels = ["47", "48"]; obj62.userData.edgeindices = [1, 0]; <!-- Edge style --> obj62.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj62); scene.add(obj62); var obj63 = new THREE.Object3D(); obj63.name = "unnamed__64"; obj63.userData.explodable = 1; obj63.userData.points = []; obj63.userData.points.push(new PMPoint(-1.2, -3.2, 4.5)); obj63.userData.points.push(new PMPoint(0, -2, 4.5)); obj63.userData.pointradii = 0.02; <!-- Vertex style --> obj63.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj63.userData.pointlabels = ["40", "49"]; obj63.userData.edgeindices = [1, 0]; <!-- Edge style --> obj63.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj63); scene.add(obj63); var obj64 = new THREE.Object3D(); obj64.name = "unnamed__65"; obj64.userData.explodable = 1; obj64.userData.points = []; obj64.userData.points.push(new PMPoint(0, -1, 4.5)); obj64.userData.points.push(new PMPoint(-1, -1, 4.5)); obj64.userData.pointradii = 0.02; <!-- Vertex style --> obj64.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj64.userData.pointlabels = ["50", "51"]; obj64.userData.edgeindices = [1, 0]; <!-- Edge style --> obj64.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj64); scene.add(obj64); var obj65 = new THREE.Object3D(); obj65.name = "unnamed__66"; obj65.userData.explodable = 1; obj65.userData.points = []; obj65.userData.points.push(new PMPoint(0, -2, 4.5)); obj65.userData.points.push(new PMPoint(0, -1, 4.5)); obj65.userData.pointradii = 0.02; <!-- Vertex style --> obj65.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj65.userData.pointlabels = ["49", "50"]; obj65.userData.edgeindices = [1, 0]; <!-- Edge style --> obj65.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj65); scene.add(obj65); var obj66 = new THREE.Object3D(); obj66.name = "unnamed__67"; obj66.userData.explodable = 1; obj66.userData.points = []; obj66.userData.points.push(new PMPoint(-3.2, -3.2, 4.5)); obj66.userData.points.push(new PMPoint(-1, -1, 4.5)); obj66.userData.pointradii = 0.02; <!-- Vertex style --> obj66.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj66.userData.pointlabels = ["24", "51"]; obj66.userData.edgeindices = [1, 0]; <!-- Edge style --> obj66.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj66); scene.add(obj66); var obj67 = new THREE.Object3D(); obj67.name = "unnamed__68"; obj67.userData.explodable = 1; obj67.userData.points = []; obj67.userData.points.push(new PMPoint(-1.2, 4.5, -3.2)); obj67.userData.points.push(new PMPoint(-1.2, -1.2, -3.2)); obj67.userData.pointradii = 0.02; <!-- Vertex style --> obj67.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj67.userData.pointlabels = ["38", "52"]; obj67.userData.edgeindices = [1, 0]; <!-- Edge style --> obj67.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj67); scene.add(obj67); var obj68 = new THREE.Object3D(); obj68.name = "unnamed__69"; obj68.userData.explodable = 1; obj68.userData.points = []; obj68.userData.points.push(new PMPoint(-3.2, -2.2, -3.2)); obj68.userData.points.push(new PMPoint(-2.2, -2.2, -3.2)); obj68.userData.pointradii = 0.02; <!-- Vertex style --> obj68.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj68.userData.pointlabels = ["23", "53"]; obj68.userData.edgeindices = [1, 0]; <!-- Edge style --> obj68.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj68); scene.add(obj68); var obj69 = new THREE.Object3D(); obj69.name = "unnamed__70"; obj69.userData.explodable = 1; obj69.userData.points = []; obj69.userData.points.push(new PMPoint(4.5, -1.2, -3.2)); obj69.userData.points.push(new PMPoint(-1.2, -1.2, -3.2)); obj69.userData.pointradii = 0.02; <!-- Vertex style --> obj69.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj69.userData.pointlabels = ["16", "52"]; obj69.userData.edgeindices = [1, 0]; <!-- Edge style --> obj69.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj69); scene.add(obj69); var obj70 = new THREE.Object3D(); obj70.name = "unnamed__71"; obj70.userData.explodable = 1; obj70.userData.points = []; obj70.userData.points.push(new PMPoint(-2.2, -3.2, -3.2)); obj70.userData.points.push(new PMPoint(-2.2, -2.2, -3.2)); obj70.userData.pointradii = 0.02; <!-- Vertex style --> obj70.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj70.userData.pointlabels = ["42", "53"]; obj70.userData.edgeindices = [1, 0]; <!-- Edge style --> obj70.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj70); scene.add(obj70); var obj71 = new THREE.Object3D(); obj71.name = "unnamed__72"; obj71.userData.explodable = 1; obj71.userData.points = []; obj71.userData.points.push(new PMPoint(-1.2, -1.2, -3.2)); obj71.userData.points.push(new PMPoint(-2.2, -2.2, -3.2)); obj71.userData.pointradii = 0.02; <!-- Vertex style --> obj71.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj71.userData.pointlabels = ["52", "53"]; obj71.userData.edgeindices = [1, 0]; <!-- Edge style --> obj71.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 1.5, transparent: false } ); init_object(obj71); scene.add(obj71); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_5'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_5').style.visibility = 'visible'; document.getElementById('showSettingsButton_5').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_5').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_5').style.visibility = 'hidden'; document.getElementById('showSettingsButton_5').style.visibility = 'visible'; document.getElementById('hideSettingsButton_5').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_5'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_5'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_5').oninput = triggerExplode; document.getElementById('explodeCheckbox_5').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_5').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_5').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_5').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_5'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_5'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_5').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_5').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_5').onchange = toggleDepthWrite; document.getElementById('changeRotationX_5').onchange = changeRotationX; document.getElementById('changeRotationY_5').onchange = changeRotationY; document.getElementById('changeRotationZ_5').onchange = changeRotationZ; document.getElementById('resetButton_5').onclick = resetScene; document.getElementById('rotationSpeedRange_5').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_5').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_5').onclick = showSettings; document.getElementById('hideSettingsButton_5').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_5').dispatchEvent(event); } else { document.getElementById('showSettingsButton_5').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> These frames can be exported into separate models <code perl> > x3d($qFrame->VISUAL($curve_opts),File=>$x3d_dir."QuadricFrame.x3d"); # exporting frames > x3d($cFrame->VISUAL($curve_opts),File=>$x3d_dir."CubicFrame.x3d"); </code> ===== Tropical curves on tropical surfaces ===== 3d-printing tropical curves on tropical surfaces is only minimally more involved than creating individual curves and surfaces. One straighforward way is to follow the previous tutorials for surfaces and curves while making sure that: - the curve is well visible, i.e., that the curve is sufficiently thick, - both curve and surface share the same bounding box. Below we show a more involved way, which leads to a better final model. In this example we will employ a boolean intersection modifier to the curve in blender and the model will end up with the exact same dimensions as the bounding cube. ==== Step 0: preparations ==== <code perl> > $surface_opts = {VertexStyle=>'hidden',EdgeStyle=>'hidden'}; > > $total_mm = 100; #planned size of the model > $curve_mm = 3; #desired edge diameter > $surface_mm = 2; #desired surface thickness (for solidfying in polymake) > $surface_abs = $surface_mm * $diam/$total_mm; > $curve_diam = $curve_mm * $diam/$total_mm; > $surface_opts = {VertexStyle=>'hidden',EdgeStyle=>'hidden'}; # hide vertex and edge labels > $curve_opts = x3dprint_curve_opts($curve_diam,$edges_diam); > > $bFacets = polytope::bounding_box_facets($TCubic->affine_chart->VERTICES,offset=>1,surplus_k=>0.4, make_cube=>1); > $diam = $bFacets->[0]->[0] + $bFacets->[1]->[0]; # diameter of the bounding box </code> Export the solidified cubic, the bounding cube <code perl> > $bPolytope = new polytope::Polytope(FACETS=>$bFacets); > x3d(compose($bPolytope->VISUAL($surface_opts)),File=>$x3d_dir."BoundingCube.x3d"); > > $solidifiedCubicCells = solidify_2d_pcom($TCubic->affine_chart,$surface_abs); > @solidifiedCubicCellsVis = map { $_->VISUAL($surface_opts,BoundingFacets=>$bFacets) } @$solidifiedCubicCells; > x3d(compose(@solidifiedCubicCellsVis),File=>$x3d_dir."TCubicSolidified.x3d"); </code> and the sextic curve with a bigger bounding box <code perl> > $b2Facets = polytope::bounding_box_facets($TCubic->affine_chart->VERTICES,surplus_k=>1, make_cube=>1); > # apply bounding beforehand > $b2Polytope = new polytope::Polytope(FACETS=>$b2Facets); > $b2Complex = new fan::PolyhedralComplex(fan::check_fan_objects(($b2Polytope))); > $b2TSextic = pcom_common_ref($TSextic->affine_chart,$b2Complex); > compose(@solidifiedCubicCellsVis,$b2TSextic->VISUAL($curve_opts)); > # exporting the uncut sextic curve > x3d($b2TSextic->VISUAL($curve_opts),File=>$x3d_dir."UncutTSextic.x3d"); </code> <HTML> <!-- polymake for knusper Wed Mar 2 22:32:48 2022 _bounded --> <html> <head> <meta charset=utf-8> <title>_bounded</title> <style> /* // COMMON_CODE_BLOCK_BEGIN */ html {overflow: scroll;} strong{font-size: 18px;} canvas { z-index: 8; } input[type='radio'] {margin-left:0;} input[type='checkbox'] {margin-right:7px; margin-left: 0px; padding-left:0px;} .group{padding-bottom: 15px;} .settings * {z-index: 11; } .settings{z-index: 10; font-family: Arial, Helvetica, sans-serif; margin-left: 30px; visibility: hidden; width: 14em; height: 96%; border: solid 1px silver; padding: 2px; overflow-y: scroll; box-sizing: border-box; background-color: white; position: absolute;} .indented{margin-left: 20px; margin-top: 10px; padding-bottom: 0px;} .shownObjectsList{overflow: auto; max-width: 150px; max-height: 150px;} .showSettingsButton{visibility: visible; z-index: 12; position: absolute } .hideSettingsButton{visibility: hidden; z-index: 12; position: absolute; opacity: 0.5} button{margin-left: 0; margin-top: 10px} img{cursor: pointer;} .suboption{padding-top: 15px;} #model46179355126 { width: 100%; height: 100%; } .threejs_container { width: 100%; height: 75vh;} .settings{max-height: 74vh} input[type=range] { -webkit-appearance: none; padding:0; width:90%; margin-left: auto; margin-right: auto; margin-top: 15px; margin-bottom: 15px; display: block; } input[type=range]:focus { outline: none; } input[type=range]::-webkit-slider-runnable-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-webkit-slider-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; -webkit-appearance: none; margin-top: -5px; } input[type=range]:focus::-webkit-slider-runnable-track { background: #E3E3E3; } input[type=range]::-moz-range-track { height: 4px; cursor: pointer; animate: 0.2s; box-shadow: 0px 0px 0px #000000; background: #E3E3E3; border-radius: 0px; border: 0px solid #000000; } input[type=range]::-moz-range-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]::-ms-track { height: 4px; cursor: pointer; animate: 0.2s; background: transparent; border-color: transparent; color: transparent; } input[type=range]::-ms-fill-lower { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-fill-upper { background: #E3E3E3; border: 0px solid #000000; border-radius: 0px; box-shadow: 0px 0px 0px #000000; } input[type=range]::-ms-thumb { box-shadow: 1px 1px 2px #B8B8B8; border: 1px solid #ABABAB; height: 13px; width: 25px; border-radius: 20px; background: #E0E0E0; cursor: pointer; } input[type=range]:focus::-ms-fill-lower { background: #E3E3E3; } input[type=range]:focus::-ms-fill-upper { background: #E3E3E3; } /* // COMMON_CODE_BLOCK_END */ </style> </head> <body> <div class='threejs_container'> <div id='settings_6' class='settings'> <div class=group id='explode_6'> <strong>Explode</strong> <input id='explodeRange_6' type='range' min='0.00001' max=6 step=0.01 value=0.00001> <div class=indented><input id='explodeCheckbox_6' type='checkbox'>Automatic explosion</div> <div class=suboption>Exploding speed</div> <input id='explodingSpeedRange_6' type='range' min=0 max=0.5 step=0.001 value=0.05> </div> <div class=group id='transparency_6' class='transparency'> <strong>Transparency</strong> <input id='transparencyRange_6' type='range' min=0 max=1 step=0.01 value=0> <div class=indented><input id='depthWriteCheckbox_6' type='checkbox'>depthWrite</div> </div> <div class=group id='rotation_6'> <strong>Rotation</strong> <div class=indented> <div><input type='checkbox' id='changeRotationX_6'> x-axis</div> <div><input type='checkbox' id='changeRotationY_6'> y-axis</div> <div><input type='checkbox' id='changeRotationZ_6'> z-axis</div> <button id='resetButton_6'>Reset</button> </div> <div class=suboption>Rotation speed</div> <input id='rotationSpeedRange_6' type='range' min=0 max=5 step=0.01 value=2> </div> <div class=group id='display_6'> <strong>Display</strong> <div class=indented> <div id='shownObjectTypesList_6' class='shownObjectsList'></div> </div> <div class=suboption>Objects</div> <div class=indented> <div id='shownObjectsList_6' class='shownObjectsList'></div> </div> </div> <div class=group id='camera_6'> <strong>Camera</strong> <div class=indented> <form> <select id="cameraType_6"> <option value='perspective' selected> Perspective<br></option> <option value='orthographic' > Orthographic<br></option> </select> </form> </div> </div> <div class=group id='svg_6'> <strong>SVG</strong> <div class=indented> <form> <input type="radio" name='screenshotMode' value='download' id='download_6' checked> Download<br> <input type="radio" name='screenshotMode' value='tab' id='tab_6' > New tab<br> </form> <button id='takeScreenshot_6'>Screenshot</button> </div> </div> </div> <!-- end of settings --> <img id='hideSettingsButton_6' class='hideSettingsButton' src='/kernelspecs/r118/polymake/close.svg' width=20px"> <img id='showSettingsButton_6' class='showSettingsButton' src='/kernelspecs/r118/polymake/menu.svg' width=20px"> <div id="model46179355126"></div> </div> <script> requirejs.config({ paths: { three: '/kernelspecs/r118/polymake/three', TrackballControls: '/kernelspecs/r118/polymake/TrackballControls', OrbitControls: '/kernelspecs/r118/polymake/OrbitControls', Projector: '/kernelspecs/r118/polymake/Projector', SVGRenderer: '/kernelspecs/r118/polymake/SVGRenderer', WEBGL: '/kernelspecs/r118/polymake/WebGL', }, shim: { 'three': { exports: 'THREE'}, 'SVGRenderer': { deps: [ 'three' ], exports: 'THREE.SVGRenderer' }, 'WEBGL': { deps: [ 'three' ], exports: 'THREE.WEBGL' }, 'Projector': { deps: [ 'three' ], exports: 'THREE.Projector' }, 'TrackballControls': { deps: [ 'three' ], exports: 'THREE.TrackballControls' }, 'OrbitControls': { deps: [ 'three' ], exports: 'THREE.OrbitControls' }, } }); require(['three'],function(THREE){ window.THREE = THREE; require(['TrackballControls', 'OrbitControls', 'Projector', 'SVGRenderer', 'WEBGL'], function(TrackballControls, OrbitControls, Projector, SVGRenderer, WEBGL) { THREE.TrackballControls = TrackballControls; THREE.OrbitControls = OrbitControls; THREE.Projector = Projector; THREE.SVGRenderer = SVGRenderer; THREE.WEBGL = WEBGL; // COMMON_CODE_BLOCK_BEGIN const intervalLength = 25; // for automatic animations const explodableModel = true; const modelContains = { points: false, pointlabels: false, lines: false, edgelabels: false, faces: false, arrowheads: false }; const foldables = []; var three = document.getElementById("model46179355126"); var scene = new THREE.Scene(); var renderer = new THREE.WebGLRenderer( { antialias: true } ); var svgRenderer = new THREE.SVGRenderer( { antialias: true } ); renderer.setPixelRatio( window.devicePixelRatio ); renderer.setClearColor(0xFFFFFF, 1); svgRenderer.setClearColor(0xFFFFFF, 1); three.appendChild(renderer.domElement); var frustumSize = 4; var cameras = [new THREE.PerspectiveCamera(75, 1, 0.1, 1000), new THREE.OrthographicCamera()]; cameras.forEach(function(cam) { cam.position.set(0, 0, 5); cam.lookAt(0, 0, 0); cam.up.set(0, 1, 0); }); var controls = [new THREE.TrackballControls(cameras[0], three), new THREE.OrbitControls(cameras[1], three)]; var camera, control; controls[0].zoomSpeed = 0.2; controls[0].rotateSpeed = 4; // class to allow move points together with labels and spheres var PMPoint = function (x,y,z) { this.vector = new THREE.Vector3(x,y,z); this.sprite = null; this.sphere = null; } PMPoint.prototype.addLabel = function(labelsprite) { this.sprite = labelsprite; this.sprite.position.copy(this.vector); } PMPoint.prototype.addSphere = function(spheremesh) { this.sphere = spheremesh; this.sphere.position.copy(this.vector); } PMPoint.prototype.set = function(x,y,z) { this.vector.set(x,y,z); if (this.sprite) { this.sprite.position.copy(this.vector); } if (this.sphere) { this.sphere.position.copy(this.vector); } } PMPoint.prototype.radius = function() { if (this.sphere) { return this.sphere.geometry.parameters.radius; } else { return 0; } }; // select the target node var target = document.querySelector('#model46179355126'); // create an observer instance var observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { if (mutation.removedNodes && mutation.removedNodes.length > 0) { cancelAnimationFrame(renderId); observer.disconnect(); console.log("cancelled frame "+renderId); } }); }); // configuration of the observer: var config = { childList: true, characterData: true } // pass in the target node, as well as the observer options while (target) { if (target.className=="output") { observer.observe(target, config); break; } target = target.parentNode; } // COMMON_CODE_BLOCK_END var obj0 = new THREE.Object3D(); obj0.name = "unnamed__1"; obj0.userData.explodable = 1; obj0.userData.points = []; obj0.userData.points.push(new PMPoint(-1, -0.0544472, 0.0544472)); obj0.userData.points.push(new PMPoint(-1, 0.0544472, -0.0544472)); obj0.userData.points.push(new PMPoint(0, -0.0544472, 0.0544472)); obj0.userData.points.push(new PMPoint(0, 0.0544472, -0.0544472)); obj0.userData.points.push(new PMPoint(0, 0.945553, 1.05445)); obj0.userData.points.push(new PMPoint(0, 1.05445, 0.945553)); obj0.userData.points.push(new PMPoint(1, 0.945553, 1.05445)); obj0.userData.points.push(new PMPoint(1, 1.05445, 0.945553)); obj0.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj0.userData.facets = [[0, 2, 6, 4], [3, 2, 0, 1], [0, 4, 5, 1], [7, 3, 1, 5], [6, 2, 3, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj0.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj0); scene.add(obj0); var obj1 = new THREE.Object3D(); obj1.name = "unnamed__2"; obj1.userData.explodable = 1; obj1.userData.points = []; obj1.userData.points.push(new PMPoint(0.945553, 0, 1.05445)); obj1.userData.points.push(new PMPoint(1.05445, 0, 0.945553)); obj1.userData.points.push(new PMPoint(-0.0544472, 0, 0.0544472)); obj1.userData.points.push(new PMPoint(0.0544472, 0, -0.0544472)); obj1.userData.points.push(new PMPoint(-0.0544472, -1, 0.0544472)); obj1.userData.points.push(new PMPoint(0.0544472, -1, -0.0544472)); obj1.userData.points.push(new PMPoint(0.945553, 1, 1.05445)); obj1.userData.points.push(new PMPoint(1.05445, 1, 0.945553)); obj1.userData.edgeindices = [0, 1, 2, 3, 0, 4, 2, 4, 1, 5, 3, 5, 4, 5, 0, 6, 2, 6, 1, 7, 3, 7, 6, 7]; obj1.userData.facets = [[4, 5, 1, 0], [3, 5, 4, 2], [4, 0, 6, 2], [7, 3, 2, 6], [1, 5, 3, 7], [0, 1, 7, 6]]; <!-- Facet style --> obj1.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj1); scene.add(obj1); var obj2 = new THREE.Object3D(); obj2.name = "unnamed__3"; obj2.userData.explodable = 1; obj2.userData.points = []; obj2.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -1)); obj2.userData.points.push(new PMPoint(0.0544472, -0.0544472, -1)); obj2.userData.points.push(new PMPoint(-0.0544472, 0.0544472, 0)); obj2.userData.points.push(new PMPoint(0.0544472, -0.0544472, 0)); obj2.userData.points.push(new PMPoint(0.945553, 1.05445, 0)); obj2.userData.points.push(new PMPoint(1.05445, 0.945553, 0)); obj2.userData.points.push(new PMPoint(0.945553, 1.05445, 1)); obj2.userData.points.push(new PMPoint(1.05445, 0.945553, 1)); obj2.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj2.userData.facets = [[1, 0, 4, 5], [2, 0, 1, 3], [4, 0, 2, 6], [6, 2, 3, 7], [1, 5, 7, 3], [5, 4, 6, 7]]; <!-- Facet style --> obj2.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj2); scene.add(obj2); var obj3 = new THREE.Object3D(); obj3.name = "unnamed__4"; obj3.userData.explodable = 1; obj3.userData.points = []; obj3.userData.points.push(new PMPoint(-1, 0, 0.077)); obj3.userData.points.push(new PMPoint(-1, 0, -0.077)); obj3.userData.points.push(new PMPoint(0, 0, 0.077)); obj3.userData.points.push(new PMPoint(0, 0, -0.077)); obj3.userData.points.push(new PMPoint(-1, -1, 0.077)); obj3.userData.points.push(new PMPoint(-1, -1, -0.077)); obj3.userData.points.push(new PMPoint(0, -1, 0.077)); obj3.userData.points.push(new PMPoint(0, -1, -0.077)); obj3.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj3.userData.facets = [[5, 1, 3, 7], [0, 1, 5, 4], [5, 7, 6, 4], [2, 0, 4, 6], [3, 1, 0, 2], [7, 3, 2, 6]]; <!-- Facet style --> obj3.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj3); scene.add(obj3); var obj4 = new THREE.Object3D(); obj4.name = "unnamed__5"; obj4.userData.explodable = 1; obj4.userData.points = []; obj4.userData.points.push(new PMPoint(-1, 0.077, 0)); obj4.userData.points.push(new PMPoint(-1, -0.077, 0)); obj4.userData.points.push(new PMPoint(0, 0.077, -1)); obj4.userData.points.push(new PMPoint(0, -0.077, -1)); obj4.userData.points.push(new PMPoint(-1, 0.077, -1)); obj4.userData.points.push(new PMPoint(-1, -0.077, -1)); obj4.userData.points.push(new PMPoint(0, 0.077, 0)); obj4.userData.points.push(new PMPoint(0, -0.077, 0)); obj4.userData.edgeindices = [0, 1, 2, 3, 0, 4, 2, 4, 1, 5, 3, 5, 4, 5, 0, 6, 2, 6, 1, 7, 3, 7, 6, 7]; obj4.userData.facets = [[5, 4, 2, 3], [0, 4, 5, 1], [5, 3, 7, 1], [6, 0, 1, 7], [2, 4, 0, 6], [3, 2, 6, 7]]; <!-- Facet style --> obj4.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj4); scene.add(obj4); var obj5 = new THREE.Object3D(); obj5.name = "unnamed__6"; obj5.userData.explodable = 1; obj5.userData.points = []; obj5.userData.points.push(new PMPoint(0.077, 0, -1)); obj5.userData.points.push(new PMPoint(-0.077, 0, -1)); obj5.userData.points.push(new PMPoint(0.077, 0, 0)); obj5.userData.points.push(new PMPoint(-0.077, 0, 0)); obj5.userData.points.push(new PMPoint(0.077, -1, -1)); obj5.userData.points.push(new PMPoint(-0.077, -1, -1)); obj5.userData.points.push(new PMPoint(0.077, -1, 0)); obj5.userData.points.push(new PMPoint(-0.077, -1, 0)); obj5.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj5.userData.facets = [[5, 1, 0, 4], [3, 1, 5, 7], [5, 4, 6, 7], [2, 3, 7, 6], [0, 1, 3, 2], [4, 0, 2, 6]]; <!-- Facet style --> obj5.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj5); scene.add(obj5); var obj6 = new THREE.Object3D(); obj6.name = "_bounded"; obj6.userData.explodable = 1; obj6.userData.points = []; obj6.userData.points.push(new PMPoint(2.077, 4.6, 2)); obj6.userData.points.push(new PMPoint(1.923, 4.6, 2)); obj6.userData.points.push(new PMPoint(1.923, 2, 2)); obj6.userData.points.push(new PMPoint(2.077, 2, 2)); obj6.userData.points.push(new PMPoint(1.923, 2, 4.6)); obj6.userData.points.push(new PMPoint(2.077, 2, 4.6)); obj6.userData.points.push(new PMPoint(1.923, 4.6, 4.6)); obj6.userData.points.push(new PMPoint(2.077, 4.6, 4.6)); obj6.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj6.userData.facets = [[5, 3, 0, 7], [1, 2, 4, 6], [2, 3, 5, 4], [0, 3, 2, 1], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj6.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj6); scene.add(obj6); var obj7 = new THREE.Object3D(); obj7.name = "_bounded"; obj7.userData.explodable = 1; obj7.userData.points = []; obj7.userData.points.push(new PMPoint(0, 1.077, 1)); obj7.userData.points.push(new PMPoint(1, 1.077, 1)); obj7.userData.points.push(new PMPoint(0, 0.923, 1)); obj7.userData.points.push(new PMPoint(1, 0.923, 1)); obj7.userData.points.push(new PMPoint(1, 0.923, 4.6)); obj7.userData.points.push(new PMPoint(0, 0.923, 4.6)); obj7.userData.points.push(new PMPoint(1, 1.077, 4.6)); obj7.userData.points.push(new PMPoint(0, 1.077, 4.6)); obj7.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj7.userData.facets = [[5, 2, 3, 4], [0, 2, 5, 7], [1, 0, 7, 6], [4, 3, 1, 6], [3, 2, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj7.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj7); scene.add(obj7); var obj8 = new THREE.Object3D(); obj8.name = "_bounded"; obj8.userData.explodable = 1; obj8.userData.points = []; obj8.userData.points.push(new PMPoint(0, 1, 1.077)); obj8.userData.points.push(new PMPoint(1, 1, 1.077)); obj8.userData.points.push(new PMPoint(0, 1, 0.923)); obj8.userData.points.push(new PMPoint(1, 1, 0.923)); obj8.userData.points.push(new PMPoint(1, 4.6, 0.923)); obj8.userData.points.push(new PMPoint(0, 4.6, 0.923)); obj8.userData.points.push(new PMPoint(1, 4.6, 1.077)); obj8.userData.points.push(new PMPoint(0, 4.6, 1.077)); obj8.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj8.userData.facets = [[2, 5, 4, 3], [7, 5, 2, 0], [6, 7, 0, 1], [3, 4, 6, 1], [2, 3, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj8.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj8); scene.add(obj8); var obj9 = new THREE.Object3D(); obj9.name = "_bounded"; obj9.userData.explodable = 1; obj9.userData.points = []; obj9.userData.points.push(new PMPoint(4.6, 2.077, 2)); obj9.userData.points.push(new PMPoint(4.6, 1.923, 2)); obj9.userData.points.push(new PMPoint(2, 1.923, 2)); obj9.userData.points.push(new PMPoint(2, 2.077, 2)); obj9.userData.points.push(new PMPoint(2, 1.923, 4.6)); obj9.userData.points.push(new PMPoint(2, 2.077, 4.6)); obj9.userData.points.push(new PMPoint(4.6, 1.923, 4.6)); obj9.userData.points.push(new PMPoint(4.6, 2.077, 4.6)); obj9.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj9.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [3, 0, 1, 2], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj9.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj9); scene.add(obj9); var obj10 = new THREE.Object3D(); obj10.name = "_bounded"; obj10.userData.explodable = 1; obj10.userData.points = []; obj10.userData.points.push(new PMPoint(1.077, 0, 1)); obj10.userData.points.push(new PMPoint(1.077, 1, 1)); obj10.userData.points.push(new PMPoint(0.923, 0, 1)); obj10.userData.points.push(new PMPoint(0.923, 1, 1)); obj10.userData.points.push(new PMPoint(0.923, 1, 4.6)); obj10.userData.points.push(new PMPoint(0.923, 0, 4.6)); obj10.userData.points.push(new PMPoint(1.077, 1, 4.6)); obj10.userData.points.push(new PMPoint(1.077, 0, 4.6)); obj10.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj10.userData.facets = [[5, 2, 0, 7], [3, 2, 5, 4], [1, 3, 4, 6], [7, 0, 1, 6], [0, 2, 3, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj10.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj10); scene.add(obj10); var obj11 = new THREE.Object3D(); obj11.name = "_bounded"; obj11.userData.explodable = 1; obj11.userData.points = []; obj11.userData.points.push(new PMPoint(1, 0, 1.077)); obj11.userData.points.push(new PMPoint(1, 1, 1.077)); obj11.userData.points.push(new PMPoint(1, 0, 0.923)); obj11.userData.points.push(new PMPoint(1, 1, 0.923)); obj11.userData.points.push(new PMPoint(4.6, 1, 0.923)); obj11.userData.points.push(new PMPoint(4.6, 0, 0.923)); obj11.userData.points.push(new PMPoint(4.6, 1, 1.077)); obj11.userData.points.push(new PMPoint(4.6, 0, 1.077)); obj11.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj11.userData.facets = [[5, 2, 3, 4], [0, 2, 5, 7], [1, 0, 7, 6], [4, 3, 1, 6], [3, 2, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj11.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj11); scene.add(obj11); var obj12 = new THREE.Object3D(); obj12.name = "_bounded"; obj12.userData.explodable = 1; obj12.userData.points = []; obj12.userData.points.push(new PMPoint(1.94555, 2.05445, 2)); obj12.userData.points.push(new PMPoint(2.05445, 1.94555, 2)); obj12.userData.points.push(new PMPoint(1.05445, 0.945553, 1)); obj12.userData.points.push(new PMPoint(0.945553, 1.05445, 1)); obj12.userData.points.push(new PMPoint(1.05445, 0.945553, 4.6)); obj12.userData.points.push(new PMPoint(0.945553, 1.05445, 4.6)); obj12.userData.points.push(new PMPoint(2.05445, 1.94555, 4.6)); obj12.userData.points.push(new PMPoint(1.94555, 2.05445, 4.6)); obj12.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj12.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj12.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj12); scene.add(obj12); var obj13 = new THREE.Object3D(); obj13.name = "_bounded"; obj13.userData.explodable = 1; obj13.userData.points = []; obj13.userData.points.push(new PMPoint(4.6, 2, 2.077)); obj13.userData.points.push(new PMPoint(4.6, 2, 1.923)); obj13.userData.points.push(new PMPoint(2, 2, 1.923)); obj13.userData.points.push(new PMPoint(2, 2, 2.077)); obj13.userData.points.push(new PMPoint(2, 4.6, 1.923)); obj13.userData.points.push(new PMPoint(2, 4.6, 2.077)); obj13.userData.points.push(new PMPoint(4.6, 4.6, 1.923)); obj13.userData.points.push(new PMPoint(4.6, 4.6, 2.077)); obj13.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj13.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [0, 3, 2, 1], [1, 2, 4, 6], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj13.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj13); scene.add(obj13); var obj14 = new THREE.Object3D(); obj14.name = "_bounded"; obj14.userData.explodable = 1; obj14.userData.points = []; obj14.userData.points.push(new PMPoint(1.077, 1, 1)); obj14.userData.points.push(new PMPoint(1.077, 1, 0)); obj14.userData.points.push(new PMPoint(0.923, 1, 1)); obj14.userData.points.push(new PMPoint(0.923, 1, 0)); obj14.userData.points.push(new PMPoint(0.923, 4.6, 0)); obj14.userData.points.push(new PMPoint(0.923, 4.6, 1)); obj14.userData.points.push(new PMPoint(1.077, 4.6, 0)); obj14.userData.points.push(new PMPoint(1.077, 4.6, 1)); obj14.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj14.userData.facets = [[3, 4, 6, 1], [5, 4, 3, 2], [7, 5, 2, 0], [1, 6, 7, 0], [3, 1, 0, 2], [6, 4, 5, 7]]; <!-- Facet style --> obj14.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj14); scene.add(obj14); var obj15 = new THREE.Object3D(); obj15.name = "_bounded"; obj15.userData.explodable = 1; obj15.userData.points = []; obj15.userData.points.push(new PMPoint(1, 1.077, 1)); obj15.userData.points.push(new PMPoint(1, 1.077, 0)); obj15.userData.points.push(new PMPoint(1, 0.923, 1)); obj15.userData.points.push(new PMPoint(1, 0.923, 0)); obj15.userData.points.push(new PMPoint(4.6, 0.923, 0)); obj15.userData.points.push(new PMPoint(4.6, 0.923, 1)); obj15.userData.points.push(new PMPoint(4.6, 1.077, 0)); obj15.userData.points.push(new PMPoint(4.6, 1.077, 1)); obj15.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj15.userData.facets = [[4, 3, 1, 6], [2, 3, 4, 5], [0, 2, 5, 7], [6, 1, 0, 7], [1, 3, 2, 0], [4, 6, 7, 5]]; <!-- Facet style --> obj15.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj15); scene.add(obj15); var obj16 = new THREE.Object3D(); obj16.name = "_bounded"; obj16.userData.explodable = 1; obj16.userData.points = []; obj16.userData.points.push(new PMPoint(1.94555, 2, 2.05445)); obj16.userData.points.push(new PMPoint(2.05445, 2, 1.94555)); obj16.userData.points.push(new PMPoint(1.05445, 1, 0.945553)); obj16.userData.points.push(new PMPoint(0.945553, 1, 1.05445)); obj16.userData.points.push(new PMPoint(1.05445, 4.6, 0.945553)); obj16.userData.points.push(new PMPoint(0.945553, 4.6, 1.05445)); obj16.userData.points.push(new PMPoint(2.05445, 4.6, 1.94555)); obj16.userData.points.push(new PMPoint(1.94555, 4.6, 2.05445)); obj16.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj16.userData.facets = [[3, 5, 4, 2], [7, 5, 3, 0], [6, 7, 0, 1], [2, 4, 6, 1], [3, 2, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj16.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj16); scene.add(obj16); var obj17 = new THREE.Object3D(); obj17.name = "_bounded"; obj17.userData.explodable = 1; obj17.userData.points = []; obj17.userData.points.push(new PMPoint(2, 1.94555, 2.05445)); obj17.userData.points.push(new PMPoint(2, 2.05445, 1.94555)); obj17.userData.points.push(new PMPoint(1, 1.05445, 0.945553)); obj17.userData.points.push(new PMPoint(1, 0.945553, 1.05445)); obj17.userData.points.push(new PMPoint(4.6, 1.05445, 0.945553)); obj17.userData.points.push(new PMPoint(4.6, 0.945553, 1.05445)); obj17.userData.points.push(new PMPoint(4.6, 2.05445, 1.94555)); obj17.userData.points.push(new PMPoint(4.6, 1.94555, 2.05445)); obj17.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj17.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj17.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj17); scene.add(obj17); var obj18 = new THREE.Object3D(); obj18.name = "_bounded"; obj18.userData.explodable = 1; obj18.userData.points = []; obj18.userData.points.push(new PMPoint(-2.077, 4.6, 0)); obj18.userData.points.push(new PMPoint(-1.923, 4.6, 0)); obj18.userData.points.push(new PMPoint(-1.923, 0, 0)); obj18.userData.points.push(new PMPoint(-2.077, 0, 0)); obj18.userData.points.push(new PMPoint(-1.923, 0, 4.6)); obj18.userData.points.push(new PMPoint(-2.077, 0, 4.6)); obj18.userData.points.push(new PMPoint(-1.923, 4.6, 4.6)); obj18.userData.points.push(new PMPoint(-2.077, 4.6, 4.6)); obj18.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj18.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj18.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj18); scene.add(obj18); var obj19 = new THREE.Object3D(); obj19.name = "_bounded"; obj19.userData.explodable = 1; obj19.userData.points = []; obj19.userData.points.push(new PMPoint(-1.05445, 0.0544472, 0)); obj19.userData.points.push(new PMPoint(-0.0544472, 1.05445, 1)); obj19.userData.points.push(new PMPoint(0.0544472, 0.945553, 1)); obj19.userData.points.push(new PMPoint(-0.945553, -0.0544472, 0)); obj19.userData.points.push(new PMPoint(0.0544472, 0.945553, 4.6)); obj19.userData.points.push(new PMPoint(-0.945553, -0.0544472, 4.6)); obj19.userData.points.push(new PMPoint(-0.0544472, 1.05445, 4.6)); obj19.userData.points.push(new PMPoint(-1.05445, 0.0544472, 4.6)); obj19.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj19.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj19.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj19); scene.add(obj19); var obj20 = new THREE.Object3D(); obj20.name = "_bounded"; obj20.userData.explodable = 1; obj20.userData.points = []; obj20.userData.points.push(new PMPoint(-1.05445, 0, 0.0544472)); obj20.userData.points.push(new PMPoint(-0.0544472, 1, 1.05445)); obj20.userData.points.push(new PMPoint(0.0544472, 1, 0.945553)); obj20.userData.points.push(new PMPoint(-0.945553, 0, -0.0544472)); obj20.userData.points.push(new PMPoint(0.0544472, 4.6, 0.945553)); obj20.userData.points.push(new PMPoint(-0.945553, 4.6, -0.0544472)); obj20.userData.points.push(new PMPoint(-0.0544472, 4.6, 1.05445)); obj20.userData.points.push(new PMPoint(-1.05445, 4.6, 0.0544472)); obj20.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj20.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj20.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj20); scene.add(obj20); var obj21 = new THREE.Object3D(); obj21.name = "_bounded"; obj21.userData.explodable = 1; obj21.userData.points = []; obj21.userData.points.push(new PMPoint(-0.077, 4.6, 1)); obj21.userData.points.push(new PMPoint(0.077, 4.6, 1)); obj21.userData.points.push(new PMPoint(0.077, 1, 1)); obj21.userData.points.push(new PMPoint(-0.077, 1, 1)); obj21.userData.points.push(new PMPoint(0.077, 1, 4.6)); obj21.userData.points.push(new PMPoint(-0.077, 1, 4.6)); obj21.userData.points.push(new PMPoint(0.077, 4.6, 4.6)); obj21.userData.points.push(new PMPoint(-0.077, 4.6, 4.6)); obj21.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj21.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj21.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj21); scene.add(obj21); var obj22 = new THREE.Object3D(); obj22.name = "_bounded"; obj22.userData.explodable = 1; obj22.userData.points = []; obj22.userData.points.push(new PMPoint(4.6, -2.077, 0)); obj22.userData.points.push(new PMPoint(4.6, -1.923, 0)); obj22.userData.points.push(new PMPoint(0, -1.923, 0)); obj22.userData.points.push(new PMPoint(0, -2.077, 0)); obj22.userData.points.push(new PMPoint(0, -1.923, 4.6)); obj22.userData.points.push(new PMPoint(0, -2.077, 4.6)); obj22.userData.points.push(new PMPoint(4.6, -1.923, 4.6)); obj22.userData.points.push(new PMPoint(4.6, -2.077, 4.6)); obj22.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj22.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj22.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj22); scene.add(obj22); var obj23 = new THREE.Object3D(); obj23.name = "_bounded"; obj23.userData.explodable = 1; obj23.userData.points = []; obj23.userData.points.push(new PMPoint(0.0544472, -1.05445, 0)); obj23.userData.points.push(new PMPoint(1.05445, -0.0544472, 1)); obj23.userData.points.push(new PMPoint(0.945553, 0.0544472, 1)); obj23.userData.points.push(new PMPoint(-0.0544472, -0.945553, 0)); obj23.userData.points.push(new PMPoint(0.945553, 0.0544472, 4.6)); obj23.userData.points.push(new PMPoint(-0.0544472, -0.945553, 4.6)); obj23.userData.points.push(new PMPoint(1.05445, -0.0544472, 4.6)); obj23.userData.points.push(new PMPoint(0.0544472, -1.05445, 4.6)); obj23.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj23.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [1, 2, 4, 6], [7, 0, 1, 6], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj23.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj23); scene.add(obj23); var obj24 = new THREE.Object3D(); obj24.name = "_bounded"; obj24.userData.explodable = 1; obj24.userData.points = []; obj24.userData.points.push(new PMPoint(0, -1.05445, 0.0544472)); obj24.userData.points.push(new PMPoint(1, -0.0544472, 1.05445)); obj24.userData.points.push(new PMPoint(1, 0.0544472, 0.945553)); obj24.userData.points.push(new PMPoint(0, -0.945553, -0.0544472)); obj24.userData.points.push(new PMPoint(4.6, 0.0544472, 0.945553)); obj24.userData.points.push(new PMPoint(4.6, -0.945553, -0.0544472)); obj24.userData.points.push(new PMPoint(4.6, -0.0544472, 1.05445)); obj24.userData.points.push(new PMPoint(4.6, -1.05445, 0.0544472)); obj24.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj24.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj24.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj24); scene.add(obj24); var obj25 = new THREE.Object3D(); obj25.name = "_bounded"; obj25.userData.explodable = 1; obj25.userData.points = []; obj25.userData.points.push(new PMPoint(4.6, -0.077, 1)); obj25.userData.points.push(new PMPoint(4.6, 0.077, 1)); obj25.userData.points.push(new PMPoint(1, 0.077, 1)); obj25.userData.points.push(new PMPoint(1, -0.077, 1)); obj25.userData.points.push(new PMPoint(1, 0.077, 4.6)); obj25.userData.points.push(new PMPoint(1, -0.077, 4.6)); obj25.userData.points.push(new PMPoint(4.6, 0.077, 4.6)); obj25.userData.points.push(new PMPoint(4.6, -0.077, 4.6)); obj25.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj25.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj25.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj25); scene.add(obj25); var obj26 = new THREE.Object3D(); obj26.name = "_bounded"; obj26.userData.explodable = 1; obj26.userData.points = []; obj26.userData.points.push(new PMPoint(4.6, 0, -2.077)); obj26.userData.points.push(new PMPoint(4.6, 0, -1.923)); obj26.userData.points.push(new PMPoint(0, 0, -1.923)); obj26.userData.points.push(new PMPoint(0, 0, -2.077)); obj26.userData.points.push(new PMPoint(0, 4.6, -1.923)); obj26.userData.points.push(new PMPoint(0, 4.6, -2.077)); obj26.userData.points.push(new PMPoint(4.6, 4.6, -1.923)); obj26.userData.points.push(new PMPoint(4.6, 4.6, -2.077)); obj26.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj26.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj26.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj26); scene.add(obj26); var obj27 = new THREE.Object3D(); obj27.name = "_bounded"; obj27.userData.explodable = 1; obj27.userData.points = []; obj27.userData.points.push(new PMPoint(0.0544472, 0, -1.05445)); obj27.userData.points.push(new PMPoint(1.05445, 1, -0.0544472)); obj27.userData.points.push(new PMPoint(0.945553, 1, 0.0544472)); obj27.userData.points.push(new PMPoint(-0.0544472, 0, -0.945553)); obj27.userData.points.push(new PMPoint(0.945553, 4.6, 0.0544472)); obj27.userData.points.push(new PMPoint(-0.0544472, 4.6, -0.945553)); obj27.userData.points.push(new PMPoint(1.05445, 4.6, -0.0544472)); obj27.userData.points.push(new PMPoint(0.0544472, 4.6, -1.05445)); obj27.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj27.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [0, 7, 6, 1], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj27.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj27); scene.add(obj27); var obj28 = new THREE.Object3D(); obj28.name = "_bounded"; obj28.userData.explodable = 1; obj28.userData.points = []; obj28.userData.points.push(new PMPoint(0, 0.0544472, -1.05445)); obj28.userData.points.push(new PMPoint(1, 1.05445, -0.0544472)); obj28.userData.points.push(new PMPoint(1, 0.945553, 0.0544472)); obj28.userData.points.push(new PMPoint(0, -0.0544472, -0.945553)); obj28.userData.points.push(new PMPoint(4.6, 0.945553, 0.0544472)); obj28.userData.points.push(new PMPoint(4.6, -0.0544472, -0.945553)); obj28.userData.points.push(new PMPoint(4.6, 1.05445, -0.0544472)); obj28.userData.points.push(new PMPoint(4.6, 0.0544472, -1.05445)); obj28.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj28.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [1, 2, 4, 6], [7, 0, 1, 6], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj28.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj28); scene.add(obj28); var obj29 = new THREE.Object3D(); obj29.name = "_bounded"; obj29.userData.explodable = 1; obj29.userData.points = []; obj29.userData.points.push(new PMPoint(4.6, 1, -0.077)); obj29.userData.points.push(new PMPoint(4.6, 1, 0.077)); obj29.userData.points.push(new PMPoint(1, 1, 0.077)); obj29.userData.points.push(new PMPoint(1, 1, -0.077)); obj29.userData.points.push(new PMPoint(1, 4.6, 0.077)); obj29.userData.points.push(new PMPoint(1, 4.6, -0.077)); obj29.userData.points.push(new PMPoint(4.6, 4.6, 0.077)); obj29.userData.points.push(new PMPoint(4.6, 4.6, -0.077)); obj29.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj29.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj29.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj29); scene.add(obj29); var obj30 = new THREE.Object3D(); obj30.name = "_bounded"; obj30.userData.explodable = 1; obj30.userData.points = []; obj30.userData.points.push(new PMPoint(-2.05445, 0.0544472, 4.6)); obj30.userData.points.push(new PMPoint(-1.94555, -0.0544472, 4.6)); obj30.userData.points.push(new PMPoint(-1.94555, -0.0544472, 0)); obj30.userData.points.push(new PMPoint(-2.05445, 0.0544472, 0)); obj30.userData.points.push(new PMPoint(-4.6, -2.70889, -2.65445)); obj30.userData.points.push(new PMPoint(-4.6, -2.49111, -2.54555)); obj30.userData.points.push(new PMPoint(-4.6, -2.70889, 4.6)); obj30.userData.points.push(new PMPoint(-4.6, -2.49111, 4.6)); obj30.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj30.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [7, 0, 3, 5], [2, 4, 5, 3], [4, 6, 7, 5], [6, 1, 0, 7]]; <!-- Facet style --> obj30.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj30); scene.add(obj30); var obj31 = new THREE.Object3D(); obj31.name = "_bounded"; obj31.userData.explodable = 1; obj31.userData.points = []; obj31.userData.points.push(new PMPoint(-1.077, -1, 0)); obj31.userData.points.push(new PMPoint(-1.077, 0, 0)); obj31.userData.points.push(new PMPoint(-0.923, 0, 0)); obj31.userData.points.push(new PMPoint(-0.923, -1, 0)); obj31.userData.points.push(new PMPoint(-0.923, 0, 4.6)); obj31.userData.points.push(new PMPoint(-0.923, -1, 4.6)); obj31.userData.points.push(new PMPoint(-1.077, 0, 4.6)); obj31.userData.points.push(new PMPoint(-1.077, -1, 4.6)); obj31.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj31.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj31.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj31); scene.add(obj31); var obj32 = new THREE.Object3D(); obj32.name = "_bounded"; obj32.userData.explodable = 1; obj32.userData.points = []; obj32.userData.points.push(new PMPoint(-4.54555, -4.6, -3.65445)); obj32.userData.points.push(new PMPoint(-0.945553, 0, -0.0544472)); obj32.userData.points.push(new PMPoint(-0.945553, -1, -0.0544472)); obj32.userData.points.push(new PMPoint(-1.05445, -1, 0.0544472)); obj32.userData.points.push(new PMPoint(-1.05445, 0, 0.0544472)); obj32.userData.points.push(new PMPoint(-4.6, -3.54555, -3.49111)); obj32.userData.points.push(new PMPoint(-4.6, -4.54555, -3.49111)); obj32.userData.points.push(new PMPoint(-4.6, -3.65445, -3.70889)); obj32.userData.points.push(new PMPoint(-4.6, -4.6, -3.70889)); obj32.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj32.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj32.userData.facets = [[6, 3, 4, 5], [2, 3, 6, 9, 0], [1, 2, 0, 8, 7], [5, 4, 1, 7], [4, 3, 2, 1], [6, 5, 7, 8, 9], [9, 8, 0]]; <!-- Facet style --> obj32.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj32); scene.add(obj32); var obj33 = new THREE.Object3D(); obj33.name = "_bounded"; obj33.userData.explodable = 1; obj33.userData.points = []; obj33.userData.points.push(new PMPoint(-2, -0.077, 0)); obj33.userData.points.push(new PMPoint(-2, 0.077, 0)); obj33.userData.points.push(new PMPoint(-1, 0.077, 0)); obj33.userData.points.push(new PMPoint(-1, -0.077, 0)); obj33.userData.points.push(new PMPoint(-1, 0.077, 4.6)); obj33.userData.points.push(new PMPoint(-1, -0.077, 4.6)); obj33.userData.points.push(new PMPoint(-2, 0.077, 4.6)); obj33.userData.points.push(new PMPoint(-2, -0.077, 4.6)); obj33.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj33.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj33.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj33); scene.add(obj33); var obj34 = new THREE.Object3D(); obj34.name = "_bounded"; obj34.userData.explodable = 1; obj34.userData.points = []; obj34.userData.points.push(new PMPoint(-2.05445, 4.6, 0.0544472)); obj34.userData.points.push(new PMPoint(-1.94555, 4.6, -0.0544472)); obj34.userData.points.push(new PMPoint(-1.94555, 0, -0.0544472)); obj34.userData.points.push(new PMPoint(-2.05445, 0, 0.0544472)); obj34.userData.points.push(new PMPoint(-4.6, -2.65445, -2.70889)); obj34.userData.points.push(new PMPoint(-4.6, -2.54555, -2.49111)); obj34.userData.points.push(new PMPoint(-4.6, 4.6, -2.70889)); obj34.userData.points.push(new PMPoint(-4.6, 4.6, -2.49111)); obj34.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj34.userData.facets = [[1, 2, 4, 6], [3, 2, 1, 0], [4, 2, 3, 5], [5, 3, 0, 7], [6, 4, 5, 7], [1, 6, 7, 0]]; <!-- Facet style --> obj34.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj34); scene.add(obj34); var obj35 = new THREE.Object3D(); obj35.name = "_bounded"; obj35.userData.explodable = 1; obj35.userData.points = []; obj35.userData.points.push(new PMPoint(-1.077, 0, -1)); obj35.userData.points.push(new PMPoint(-1.077, 0, 0)); obj35.userData.points.push(new PMPoint(-0.923, 0, 0)); obj35.userData.points.push(new PMPoint(-0.923, 0, -1)); obj35.userData.points.push(new PMPoint(-0.923, 4.6, 0)); obj35.userData.points.push(new PMPoint(-0.923, 4.6, -1)); obj35.userData.points.push(new PMPoint(-1.077, 4.6, 0)); obj35.userData.points.push(new PMPoint(-1.077, 4.6, -1)); obj35.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj35.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj35.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj35); scene.add(obj35); var obj36 = new THREE.Object3D(); obj36.name = "_bounded"; obj36.userData.explodable = 1; obj36.userData.points = []; obj36.userData.points.push(new PMPoint(-4.54555, -3.65445, -4.6)); obj36.userData.points.push(new PMPoint(-0.945553, -0.0544472, 0)); obj36.userData.points.push(new PMPoint(-0.945553, -0.0544472, -1)); obj36.userData.points.push(new PMPoint(-1.05445, 0.0544472, -1)); obj36.userData.points.push(new PMPoint(-1.05445, 0.0544472, 0)); obj36.userData.points.push(new PMPoint(-4.6, -3.49111, -3.54555)); obj36.userData.points.push(new PMPoint(-4.6, -3.49111, -4.54555)); obj36.userData.points.push(new PMPoint(-4.6, -3.70889, -3.65445)); obj36.userData.points.push(new PMPoint(-4.6, -3.70889, -4.6)); obj36.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj36.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj36.userData.facets = [[6, 3, 2, 0, 9], [4, 3, 6, 5], [1, 4, 5, 7], [0, 2, 1, 7, 8], [2, 3, 4, 1], [6, 9, 8, 7, 5], [9, 0, 8]]; <!-- Facet style --> obj36.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj36); scene.add(obj36); var obj37 = new THREE.Object3D(); obj37.name = "_bounded"; obj37.userData.explodable = 1; obj37.userData.points = []; obj37.userData.points.push(new PMPoint(-2, 0, -0.077)); obj37.userData.points.push(new PMPoint(-2, 0, 0.077)); obj37.userData.points.push(new PMPoint(-1, 0, 0.077)); obj37.userData.points.push(new PMPoint(-1, 0, -0.077)); obj37.userData.points.push(new PMPoint(-1, 4.6, 0.077)); obj37.userData.points.push(new PMPoint(-1, 4.6, -0.077)); obj37.userData.points.push(new PMPoint(-2, 4.6, 0.077)); obj37.userData.points.push(new PMPoint(-2, 4.6, -0.077)); obj37.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj37.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj37.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj37); scene.add(obj37); var obj38 = new THREE.Object3D(); obj38.name = "_bounded"; obj38.userData.explodable = 1; obj38.userData.points = []; obj38.userData.points.push(new PMPoint(-2, -0.0544472, 0.0544472)); obj38.userData.points.push(new PMPoint(-2, 0.0544472, -0.0544472)); obj38.userData.points.push(new PMPoint(-1, 0.0544472, -0.0544472)); obj38.userData.points.push(new PMPoint(-1, -0.0544472, 0.0544472)); obj38.userData.points.push(new PMPoint(-4.6, -3.54555, -3.65445)); obj38.userData.points.push(new PMPoint(-4.6, -3.65445, -3.54555)); obj38.userData.points.push(new PMPoint(-4.6, -2.54555, -2.65445)); obj38.userData.points.push(new PMPoint(-4.6, -2.65445, -2.54555)); obj38.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj38.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj38.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj38); scene.add(obj38); var obj39 = new THREE.Object3D(); obj39.name = "_bounded"; obj39.userData.explodable = 1; obj39.userData.points = []; obj39.userData.points.push(new PMPoint(0.0544472, -2.05445, 4.6)); obj39.userData.points.push(new PMPoint(-0.0544472, -1.94555, 4.6)); obj39.userData.points.push(new PMPoint(-0.0544472, -1.94555, 0)); obj39.userData.points.push(new PMPoint(0.0544472, -2.05445, 0)); obj39.userData.points.push(new PMPoint(-2.70889, -4.6, -2.65445)); obj39.userData.points.push(new PMPoint(-2.49111, -4.6, -2.54555)); obj39.userData.points.push(new PMPoint(-2.70889, -4.6, 4.6)); obj39.userData.points.push(new PMPoint(-2.49111, -4.6, 4.6)); obj39.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj39.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [6, 1, 2, 4], [3, 5, 4, 2], [5, 7, 6, 4], [7, 0, 1, 6]]; <!-- Facet style --> obj39.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj39); scene.add(obj39); var obj40 = new THREE.Object3D(); obj40.name = "_bounded"; obj40.userData.explodable = 1; obj40.userData.points = []; obj40.userData.points.push(new PMPoint(-1, -1.077, 0)); obj40.userData.points.push(new PMPoint(0, -1.077, 0)); obj40.userData.points.push(new PMPoint(0, -0.923, 0)); obj40.userData.points.push(new PMPoint(-1, -0.923, 0)); obj40.userData.points.push(new PMPoint(0, -0.923, 4.6)); obj40.userData.points.push(new PMPoint(-1, -0.923, 4.6)); obj40.userData.points.push(new PMPoint(0, -1.077, 4.6)); obj40.userData.points.push(new PMPoint(-1, -1.077, 4.6)); obj40.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj40.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj40.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj40); scene.add(obj40); var obj41 = new THREE.Object3D(); obj41.name = "_bounded"; obj41.userData.explodable = 1; obj41.userData.points = []; obj41.userData.points.push(new PMPoint(-4.54555, -4.6, -3.49111)); obj41.userData.points.push(new PMPoint(-3.54555, -4.6, -3.49111)); obj41.userData.points.push(new PMPoint(-3.65445, -4.6, -3.70889)); obj41.userData.points.push(new PMPoint(-1, -0.945553, -0.0544472)); obj41.userData.points.push(new PMPoint(0, -0.945553, -0.0544472)); obj41.userData.points.push(new PMPoint(0, -1.05445, 0.0544472)); obj41.userData.points.push(new PMPoint(-1, -1.05445, 0.0544472)); obj41.userData.points.push(new PMPoint(-4.6, -4.54555, -3.65445)); obj41.userData.points.push(new PMPoint(-4.6, -4.6, -3.70889)); obj41.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj41.userData.edgeindices = [0, 1, 1, 2, 2, 4, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 3, 7, 2, 8, 7, 8, 0, 9, 7, 9, 8, 9]; obj41.userData.facets = [[0, 6, 3, 7, 9], [5, 6, 0, 1], [4, 5, 1, 2], [7, 3, 4, 2, 8], [3, 6, 5, 4], [9, 7, 8], [0, 9, 8, 2, 1]]; <!-- Facet style --> obj41.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj41); scene.add(obj41); var obj42 = new THREE.Object3D(); obj42.name = "_bounded"; obj42.userData.explodable = 1; obj42.userData.points = []; obj42.userData.points.push(new PMPoint(-0.077, -2, 0)); obj42.userData.points.push(new PMPoint(0.077, -2, 0)); obj42.userData.points.push(new PMPoint(0.077, -1, 0)); obj42.userData.points.push(new PMPoint(-0.077, -1, 0)); obj42.userData.points.push(new PMPoint(0.077, -1, 4.6)); obj42.userData.points.push(new PMPoint(-0.077, -1, 4.6)); obj42.userData.points.push(new PMPoint(0.077, -2, 4.6)); obj42.userData.points.push(new PMPoint(-0.077, -2, 4.6)); obj42.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj42.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj42.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj42); scene.add(obj42); var obj43 = new THREE.Object3D(); obj43.name = "_bounded"; obj43.userData.explodable = 1; obj43.userData.points = []; obj43.userData.points.push(new PMPoint(-4.49111, -4.6, 4.6)); obj43.userData.points.push(new PMPoint(-4.49111, -4.6, -3.54555)); obj43.userData.points.push(new PMPoint(-1.05445, -0.945553, 0)); obj43.userData.points.push(new PMPoint(-0.945553, -1.05445, 0)); obj43.userData.points.push(new PMPoint(-0.945553, -1.05445, 4.6)); obj43.userData.points.push(new PMPoint(-1.05445, -0.945553, 4.6)); obj43.userData.points.push(new PMPoint(-4.6, -4.49111, 4.6)); obj43.userData.points.push(new PMPoint(-4.6, -4.49111, -3.54555)); obj43.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj43.userData.points.push(new PMPoint(-4.6, -4.6, 4.6)); obj43.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj43.userData.facets = [[3, 4, 0, 1], [5, 4, 3, 2], [6, 5, 2, 7], [3, 1, 8, 7, 2], [9, 6, 7, 8], [1, 0, 9, 8], [0, 4, 5, 6, 9]]; <!-- Facet style --> obj43.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj43); scene.add(obj43); var obj44 = new THREE.Object3D(); obj44.name = "_bounded"; obj44.userData.explodable = 1; obj44.userData.points = []; obj44.userData.points.push(new PMPoint(0.0544472, 4.6, -2.05445)); obj44.userData.points.push(new PMPoint(-0.0544472, 4.6, -1.94555)); obj44.userData.points.push(new PMPoint(-0.0544472, 0, -1.94555)); obj44.userData.points.push(new PMPoint(0.0544472, 0, -2.05445)); obj44.userData.points.push(new PMPoint(-2.70889, -2.65445, -4.6)); obj44.userData.points.push(new PMPoint(-2.49111, -2.54555, -4.6)); obj44.userData.points.push(new PMPoint(-2.70889, 4.6, -4.6)); obj44.userData.points.push(new PMPoint(-2.49111, 4.6, -4.6)); obj44.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj44.userData.facets = [[0, 3, 5, 7], [2, 3, 0, 1], [5, 3, 2, 4], [4, 2, 1, 6], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj44.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj44); scene.add(obj44); var obj45 = new THREE.Object3D(); obj45.name = "_bounded"; obj45.userData.explodable = 1; obj45.userData.points = []; obj45.userData.points.push(new PMPoint(-1, 0, -1.077)); obj45.userData.points.push(new PMPoint(0, 0, -1.077)); obj45.userData.points.push(new PMPoint(0, 0, -0.923)); obj45.userData.points.push(new PMPoint(-1, 0, -0.923)); obj45.userData.points.push(new PMPoint(0, 4.6, -0.923)); obj45.userData.points.push(new PMPoint(-1, 4.6, -0.923)); obj45.userData.points.push(new PMPoint(0, 4.6, -1.077)); obj45.userData.points.push(new PMPoint(-1, 4.6, -1.077)); obj45.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj45.userData.facets = [[0, 7, 6, 1], [5, 7, 0, 3], [4, 5, 3, 2], [1, 6, 4, 2], [0, 1, 2, 3], [6, 7, 5, 4]]; <!-- Facet style --> obj45.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj45); scene.add(obj45); var obj46 = new THREE.Object3D(); obj46.name = "_bounded"; obj46.userData.explodable = 1; obj46.userData.points = []; obj46.userData.points.push(new PMPoint(-4.54555, -3.49111, -4.6)); obj46.userData.points.push(new PMPoint(-3.54555, -3.49111, -4.6)); obj46.userData.points.push(new PMPoint(-3.65445, -3.70889, -4.6)); obj46.userData.points.push(new PMPoint(-1, -0.0544472, -0.945553)); obj46.userData.points.push(new PMPoint(0, -0.0544472, -0.945553)); obj46.userData.points.push(new PMPoint(0, 0.0544472, -1.05445)); obj46.userData.points.push(new PMPoint(-1, 0.0544472, -1.05445)); obj46.userData.points.push(new PMPoint(-4.6, -3.65445, -4.54555)); obj46.userData.points.push(new PMPoint(-4.6, -3.70889, -4.6)); obj46.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj46.userData.edgeindices = [0, 1, 1, 2, 2, 4, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 3, 7, 2, 8, 7, 8, 0, 9, 7, 9, 8, 9]; obj46.userData.facets = [[7, 3, 6, 0, 9], [4, 3, 7, 8, 2], [5, 4, 2, 1], [0, 6, 5, 1], [6, 3, 4, 5], [7, 9, 8], [9, 0, 1, 2, 8]]; <!-- Facet style --> obj46.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj46); scene.add(obj46); var obj47 = new THREE.Object3D(); obj47.name = "_bounded"; obj47.userData.explodable = 1; obj47.userData.points = []; obj47.userData.points.push(new PMPoint(-0.077, 0, -2)); obj47.userData.points.push(new PMPoint(0.077, 0, -2)); obj47.userData.points.push(new PMPoint(0.077, 0, -1)); obj47.userData.points.push(new PMPoint(-0.077, 0, -1)); obj47.userData.points.push(new PMPoint(0.077, 4.6, -1)); obj47.userData.points.push(new PMPoint(-0.077, 4.6, -1)); obj47.userData.points.push(new PMPoint(0.077, 4.6, -2)); obj47.userData.points.push(new PMPoint(-0.077, 4.6, -2)); obj47.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj47.userData.facets = [[0, 7, 6, 1], [5, 7, 0, 3], [4, 5, 3, 2], [1, 6, 4, 2], [0, 1, 2, 3], [6, 7, 5, 4]]; <!-- Facet style --> obj47.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj47); scene.add(obj47); var obj48 = new THREE.Object3D(); obj48.name = "_bounded"; obj48.userData.explodable = 1; obj48.userData.points = []; obj48.userData.points.push(new PMPoint(-4.49111, 4.6, -4.6)); obj48.userData.points.push(new PMPoint(-4.49111, -3.54555, -4.6)); obj48.userData.points.push(new PMPoint(-1.05445, 0, -0.945553)); obj48.userData.points.push(new PMPoint(-0.945553, 0, -1.05445)); obj48.userData.points.push(new PMPoint(-0.945553, 4.6, -1.05445)); obj48.userData.points.push(new PMPoint(-1.05445, 4.6, -0.945553)); obj48.userData.points.push(new PMPoint(-4.6, 4.6, -4.49111)); obj48.userData.points.push(new PMPoint(-4.6, -3.54555, -4.49111)); obj48.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj48.userData.points.push(new PMPoint(-4.6, 4.6, -4.6)); obj48.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj48.userData.facets = [[4, 3, 1, 0], [2, 3, 4, 5], [1, 3, 2, 7, 8], [7, 2, 5, 6], [8, 7, 6, 9], [4, 0, 9, 6, 5], [0, 1, 8, 9]]; <!-- Facet style --> obj48.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj48); scene.add(obj48); var obj49 = new THREE.Object3D(); obj49.name = "_bounded"; obj49.userData.explodable = 1; obj49.userData.points = []; obj49.userData.points.push(new PMPoint(4.6, -2.05445, 0.0544472)); obj49.userData.points.push(new PMPoint(4.6, -1.94555, -0.0544472)); obj49.userData.points.push(new PMPoint(0, -1.94555, -0.0544472)); obj49.userData.points.push(new PMPoint(0, -2.05445, 0.0544472)); obj49.userData.points.push(new PMPoint(-2.65445, -4.6, -2.70889)); obj49.userData.points.push(new PMPoint(-2.54555, -4.6, -2.49111)); obj49.userData.points.push(new PMPoint(4.6, -4.6, -2.70889)); obj49.userData.points.push(new PMPoint(4.6, -4.6, -2.49111)); obj49.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj49.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [2, 4, 5, 3], [7, 0, 3, 5], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj49.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj49); scene.add(obj49); var obj50 = new THREE.Object3D(); obj50.name = "_bounded"; obj50.userData.explodable = 1; obj50.userData.points = []; obj50.userData.points.push(new PMPoint(0, -1.077, -1)); obj50.userData.points.push(new PMPoint(0, -1.077, 0)); obj50.userData.points.push(new PMPoint(0, -0.923, 0)); obj50.userData.points.push(new PMPoint(0, -0.923, -1)); obj50.userData.points.push(new PMPoint(4.6, -0.923, 0)); obj50.userData.points.push(new PMPoint(4.6, -0.923, -1)); obj50.userData.points.push(new PMPoint(4.6, -1.077, 0)); obj50.userData.points.push(new PMPoint(4.6, -1.077, -1)); obj50.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj50.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj50.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj50); scene.add(obj50); var obj51 = new THREE.Object3D(); obj51.name = "_bounded"; obj51.userData.explodable = 1; obj51.userData.points = []; obj51.userData.points.push(new PMPoint(-3.65445, -4.54555, -4.6)); obj51.userData.points.push(new PMPoint(-0.0544472, -0.945553, 0)); obj51.userData.points.push(new PMPoint(-0.0544472, -0.945553, -1)); obj51.userData.points.push(new PMPoint(0.0544472, -1.05445, -1)); obj51.userData.points.push(new PMPoint(0.0544472, -1.05445, 0)); obj51.userData.points.push(new PMPoint(-3.49111, -4.6, -3.54555)); obj51.userData.points.push(new PMPoint(-3.49111, -4.6, -4.54555)); obj51.userData.points.push(new PMPoint(-3.70889, -4.6, -3.65445)); obj51.userData.points.push(new PMPoint(-3.70889, -4.6, -4.6)); obj51.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj51.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj51.userData.facets = [[0, 2, 3, 6, 9], [1, 2, 0, 8, 7], [4, 1, 7, 5], [6, 3, 4, 5], [3, 2, 1, 4], [9, 6, 5, 7, 8], [0, 9, 8]]; <!-- Facet style --> obj51.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj51); scene.add(obj51); var obj52 = new THREE.Object3D(); obj52.name = "_bounded"; obj52.userData.explodable = 1; obj52.userData.points = []; obj52.userData.points.push(new PMPoint(0, -2, -0.077)); obj52.userData.points.push(new PMPoint(0, -2, 0.077)); obj52.userData.points.push(new PMPoint(0, -1, 0.077)); obj52.userData.points.push(new PMPoint(0, -1, -0.077)); obj52.userData.points.push(new PMPoint(4.6, -1, 0.077)); obj52.userData.points.push(new PMPoint(4.6, -1, -0.077)); obj52.userData.points.push(new PMPoint(4.6, -2, 0.077)); obj52.userData.points.push(new PMPoint(4.6, -2, -0.077)); obj52.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj52.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj52.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj52); scene.add(obj52); var obj53 = new THREE.Object3D(); obj53.name = "_bounded"; obj53.userData.explodable = 1; obj53.userData.points = []; obj53.userData.points.push(new PMPoint(-0.0544472, -2, 0.0544472)); obj53.userData.points.push(new PMPoint(0.0544472, -2, -0.0544472)); obj53.userData.points.push(new PMPoint(0.0544472, -1, -0.0544472)); obj53.userData.points.push(new PMPoint(-0.0544472, -1, 0.0544472)); obj53.userData.points.push(new PMPoint(-3.54555, -4.6, -3.65445)); obj53.userData.points.push(new PMPoint(-3.65445, -4.6, -3.54555)); obj53.userData.points.push(new PMPoint(-2.54555, -4.6, -2.65445)); obj53.userData.points.push(new PMPoint(-2.65445, -4.6, -2.54555)); obj53.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj53.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj53.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj53); scene.add(obj53); var obj54 = new THREE.Object3D(); obj54.name = "_bounded"; obj54.userData.explodable = 1; obj54.userData.points = []; obj54.userData.points.push(new PMPoint(4.6, 0.0544472, -2.05445)); obj54.userData.points.push(new PMPoint(4.6, -0.0544472, -1.94555)); obj54.userData.points.push(new PMPoint(0, -0.0544472, -1.94555)); obj54.userData.points.push(new PMPoint(0, 0.0544472, -2.05445)); obj54.userData.points.push(new PMPoint(-2.65445, -2.70889, -4.6)); obj54.userData.points.push(new PMPoint(-2.54555, -2.49111, -4.6)); obj54.userData.points.push(new PMPoint(4.6, -2.70889, -4.6)); obj54.userData.points.push(new PMPoint(4.6, -2.49111, -4.6)); obj54.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj54.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [3, 5, 4, 2], [6, 1, 2, 4], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj54.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj54); scene.add(obj54); var obj55 = new THREE.Object3D(); obj55.name = "_bounded"; obj55.userData.explodable = 1; obj55.userData.points = []; obj55.userData.points.push(new PMPoint(0, -1, -1.077)); obj55.userData.points.push(new PMPoint(0, 0, -1.077)); obj55.userData.points.push(new PMPoint(0, 0, -0.923)); obj55.userData.points.push(new PMPoint(0, -1, -0.923)); obj55.userData.points.push(new PMPoint(4.6, 0, -0.923)); obj55.userData.points.push(new PMPoint(4.6, -1, -0.923)); obj55.userData.points.push(new PMPoint(4.6, 0, -1.077)); obj55.userData.points.push(new PMPoint(4.6, -1, -1.077)); obj55.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj55.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj55.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj55); scene.add(obj55); var obj56 = new THREE.Object3D(); obj56.name = "_bounded"; obj56.userData.explodable = 1; obj56.userData.points = []; obj56.userData.points.push(new PMPoint(-3.49111, -3.54555, -4.6)); obj56.userData.points.push(new PMPoint(-3.49111, -4.54555, -4.6)); obj56.userData.points.push(new PMPoint(-3.70889, -3.65445, -4.6)); obj56.userData.points.push(new PMPoint(-0.0544472, 0, -0.945553)); obj56.userData.points.push(new PMPoint(-0.0544472, -1, -0.945553)); obj56.userData.points.push(new PMPoint(0.0544472, -1, -1.05445)); obj56.userData.points.push(new PMPoint(0.0544472, 0, -1.05445)); obj56.userData.points.push(new PMPoint(-3.65445, -4.6, -4.54555)); obj56.userData.points.push(new PMPoint(-3.70889, -4.6, -4.6)); obj56.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj56.userData.edgeindices = [0, 1, 0, 2, 2, 3, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 4, 7, 2, 8, 7, 8, 1, 9, 7, 9, 8, 9]; obj56.userData.facets = [[7, 4, 3, 2, 8], [5, 4, 7, 9, 1], [6, 5, 1, 0], [2, 3, 6, 0], [3, 4, 5, 6], [7, 8, 9], [8, 2, 0, 1, 9]]; <!-- Facet style --> obj56.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj56); scene.add(obj56); var obj57 = new THREE.Object3D(); obj57.name = "_bounded"; obj57.userData.explodable = 1; obj57.userData.points = []; obj57.userData.points.push(new PMPoint(0, -0.077, -2)); obj57.userData.points.push(new PMPoint(0, 0.077, -2)); obj57.userData.points.push(new PMPoint(0, 0.077, -1)); obj57.userData.points.push(new PMPoint(0, -0.077, -1)); obj57.userData.points.push(new PMPoint(4.6, 0.077, -1)); obj57.userData.points.push(new PMPoint(4.6, -0.077, -1)); obj57.userData.points.push(new PMPoint(4.6, 0.077, -2)); obj57.userData.points.push(new PMPoint(4.6, -0.077, -2)); obj57.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj57.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj57.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj57); scene.add(obj57); var obj58 = new THREE.Object3D(); obj58.name = "_bounded"; obj58.userData.explodable = 1; obj58.userData.points = []; obj58.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -2)); obj58.userData.points.push(new PMPoint(0.0544472, -0.0544472, -2)); obj58.userData.points.push(new PMPoint(0.0544472, -0.0544472, -1)); obj58.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -1)); obj58.userData.points.push(new PMPoint(-3.54555, -3.65445, -4.6)); obj58.userData.points.push(new PMPoint(-3.65445, -3.54555, -4.6)); obj58.userData.points.push(new PMPoint(-2.54555, -2.65445, -4.6)); obj58.userData.points.push(new PMPoint(-2.65445, -2.54555, -4.6)); obj58.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj58.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj58.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj58); scene.add(obj58); var obj59 = new THREE.Object3D(); obj59.name = "_bounded"; obj59.userData.explodable = 1; obj59.userData.points = []; obj59.userData.points.push(new PMPoint(4.6, -4.49111, -4.6)); obj59.userData.points.push(new PMPoint(-3.54555, -4.49111, -4.6)); obj59.userData.points.push(new PMPoint(0, -1.05445, -0.945553)); obj59.userData.points.push(new PMPoint(0, -0.945553, -1.05445)); obj59.userData.points.push(new PMPoint(4.6, -0.945553, -1.05445)); obj59.userData.points.push(new PMPoint(4.6, -1.05445, -0.945553)); obj59.userData.points.push(new PMPoint(4.6, -4.6, -4.49111)); obj59.userData.points.push(new PMPoint(-3.54555, -4.6, -4.49111)); obj59.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj59.userData.points.push(new PMPoint(4.6, -4.6, -4.6)); obj59.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj59.userData.facets = [[3, 4, 0, 1], [5, 4, 3, 2], [3, 1, 8, 7, 2], [6, 5, 2, 7], [0, 4, 5, 6, 9], [9, 6, 7, 8], [1, 0, 9, 8]]; <!-- Facet style --> obj59.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj59); scene.add(obj59); var obj60 = new THREE.Object3D(); obj60.name = "unnamed__7"; obj60.userData.explodable = 1; obj60.userData.points = []; obj60.userData.points.push(new PMPoint(0.945553, 0, 1.05445)); obj60.userData.points.push(new PMPoint(1.05445, 0, 0.945553)); obj60.userData.points.push(new PMPoint(-0.0544472, 0, 0.0544472)); obj60.userData.points.push(new PMPoint(0.0544472, 0, -0.0544472)); obj60.userData.points.push(new PMPoint(-0.0544472, -1, 0.0544472)); obj60.userData.points.push(new PMPoint(0.0544472, -1, -0.0544472)); obj60.userData.points.push(new PMPoint(0.945553, 1, 1.05445)); obj60.userData.points.push(new PMPoint(1.05445, 1, 0.945553)); obj60.userData.edgeindices = [0, 1, 2, 3, 0, 4, 2, 4, 1, 5, 3, 5, 4, 5, 0, 6, 2, 6, 1, 7, 3, 7, 6, 7]; obj60.userData.facets = [[4, 5, 1, 0], [3, 5, 4, 2], [4, 0, 6, 2], [7, 3, 2, 6], [1, 5, 3, 7], [0, 1, 7, 6]]; <!-- Facet style --> obj60.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj60); scene.add(obj60); var obj61 = new THREE.Object3D(); obj61.name = "unnamed__8"; obj61.userData.explodable = 1; obj61.userData.points = []; obj61.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -1)); obj61.userData.points.push(new PMPoint(0.0544472, -0.0544472, -1)); obj61.userData.points.push(new PMPoint(-0.0544472, 0.0544472, 0)); obj61.userData.points.push(new PMPoint(0.0544472, -0.0544472, 0)); obj61.userData.points.push(new PMPoint(0.945553, 1.05445, 0)); obj61.userData.points.push(new PMPoint(1.05445, 0.945553, 0)); obj61.userData.points.push(new PMPoint(0.945553, 1.05445, 1)); obj61.userData.points.push(new PMPoint(1.05445, 0.945553, 1)); obj61.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj61.userData.facets = [[1, 0, 4, 5], [2, 0, 1, 3], [4, 0, 2, 6], [6, 2, 3, 7], [1, 5, 7, 3], [5, 4, 6, 7]]; <!-- Facet style --> obj61.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj61); scene.add(obj61); var obj62 = new THREE.Object3D(); obj62.name = "unnamed__9"; obj62.userData.explodable = 1; obj62.userData.points = []; obj62.userData.points.push(new PMPoint(-1, 0, 0.077)); obj62.userData.points.push(new PMPoint(-1, 0, -0.077)); obj62.userData.points.push(new PMPoint(0, 0, 0.077)); obj62.userData.points.push(new PMPoint(0, 0, -0.077)); obj62.userData.points.push(new PMPoint(-1, -1, 0.077)); obj62.userData.points.push(new PMPoint(-1, -1, -0.077)); obj62.userData.points.push(new PMPoint(0, -1, 0.077)); obj62.userData.points.push(new PMPoint(0, -1, -0.077)); obj62.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj62.userData.facets = [[5, 1, 3, 7], [0, 1, 5, 4], [5, 7, 6, 4], [2, 0, 4, 6], [3, 1, 0, 2], [7, 3, 2, 6]]; <!-- Facet style --> obj62.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj62); scene.add(obj62); var obj63 = new THREE.Object3D(); obj63.name = "unnamed__10"; obj63.userData.explodable = 1; obj63.userData.points = []; obj63.userData.points.push(new PMPoint(-1, 0.077, 0)); obj63.userData.points.push(new PMPoint(-1, -0.077, 0)); obj63.userData.points.push(new PMPoint(0, 0.077, -1)); obj63.userData.points.push(new PMPoint(0, -0.077, -1)); obj63.userData.points.push(new PMPoint(-1, 0.077, -1)); obj63.userData.points.push(new PMPoint(-1, -0.077, -1)); obj63.userData.points.push(new PMPoint(0, 0.077, 0)); obj63.userData.points.push(new PMPoint(0, -0.077, 0)); obj63.userData.edgeindices = [0, 1, 2, 3, 0, 4, 2, 4, 1, 5, 3, 5, 4, 5, 0, 6, 2, 6, 1, 7, 3, 7, 6, 7]; obj63.userData.facets = [[5, 4, 2, 3], [0, 4, 5, 1], [5, 3, 7, 1], [6, 0, 1, 7], [2, 4, 0, 6], [3, 2, 6, 7]]; <!-- Facet style --> obj63.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj63); scene.add(obj63); var obj64 = new THREE.Object3D(); obj64.name = "unnamed__11"; obj64.userData.explodable = 1; obj64.userData.points = []; obj64.userData.points.push(new PMPoint(0.077, 0, -1)); obj64.userData.points.push(new PMPoint(-0.077, 0, -1)); obj64.userData.points.push(new PMPoint(0.077, 0, 0)); obj64.userData.points.push(new PMPoint(-0.077, 0, 0)); obj64.userData.points.push(new PMPoint(0.077, -1, -1)); obj64.userData.points.push(new PMPoint(-0.077, -1, -1)); obj64.userData.points.push(new PMPoint(0.077, -1, 0)); obj64.userData.points.push(new PMPoint(-0.077, -1, 0)); obj64.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 0, 4, 1, 5, 4, 5, 2, 6, 4, 6, 3, 7, 5, 7, 6, 7]; obj64.userData.facets = [[5, 1, 0, 4], [3, 1, 5, 7], [5, 4, 6, 7], [2, 3, 7, 6], [0, 1, 3, 2], [4, 0, 2, 6]]; <!-- Facet style --> obj64.userData.facetmaterial = new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ); init_object(obj64); scene.add(obj64); var obj65 = new THREE.Object3D(); obj65.name = "_bounded"; obj65.userData.explodable = 1; obj65.userData.points = []; obj65.userData.points.push(new PMPoint(2.077, 4.6, 2)); obj65.userData.points.push(new PMPoint(1.923, 4.6, 2)); obj65.userData.points.push(new PMPoint(1.923, 2, 2)); obj65.userData.points.push(new PMPoint(2.077, 2, 2)); obj65.userData.points.push(new PMPoint(1.923, 2, 4.6)); obj65.userData.points.push(new PMPoint(2.077, 2, 4.6)); obj65.userData.points.push(new PMPoint(1.923, 4.6, 4.6)); obj65.userData.points.push(new PMPoint(2.077, 4.6, 4.6)); obj65.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj65.userData.facets = [[5, 3, 0, 7], [1, 2, 4, 6], [2, 3, 5, 4], [0, 3, 2, 1], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj65.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj65); scene.add(obj65); var obj66 = new THREE.Object3D(); obj66.name = "_bounded"; obj66.userData.explodable = 1; obj66.userData.points = []; obj66.userData.points.push(new PMPoint(0, 1.077, 1)); obj66.userData.points.push(new PMPoint(1, 1.077, 1)); obj66.userData.points.push(new PMPoint(0, 0.923, 1)); obj66.userData.points.push(new PMPoint(1, 0.923, 1)); obj66.userData.points.push(new PMPoint(1, 0.923, 4.6)); obj66.userData.points.push(new PMPoint(0, 0.923, 4.6)); obj66.userData.points.push(new PMPoint(1, 1.077, 4.6)); obj66.userData.points.push(new PMPoint(0, 1.077, 4.6)); obj66.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj66.userData.facets = [[5, 2, 3, 4], [0, 2, 5, 7], [1, 0, 7, 6], [4, 3, 1, 6], [3, 2, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj66.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj66); scene.add(obj66); var obj67 = new THREE.Object3D(); obj67.name = "_bounded"; obj67.userData.explodable = 1; obj67.userData.points = []; obj67.userData.points.push(new PMPoint(0, 1, 1.077)); obj67.userData.points.push(new PMPoint(1, 1, 1.077)); obj67.userData.points.push(new PMPoint(0, 1, 0.923)); obj67.userData.points.push(new PMPoint(1, 1, 0.923)); obj67.userData.points.push(new PMPoint(1, 4.6, 0.923)); obj67.userData.points.push(new PMPoint(0, 4.6, 0.923)); obj67.userData.points.push(new PMPoint(1, 4.6, 1.077)); obj67.userData.points.push(new PMPoint(0, 4.6, 1.077)); obj67.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj67.userData.facets = [[2, 5, 4, 3], [7, 5, 2, 0], [6, 7, 0, 1], [3, 4, 6, 1], [2, 3, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj67.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj67); scene.add(obj67); var obj68 = new THREE.Object3D(); obj68.name = "_bounded"; obj68.userData.explodable = 1; obj68.userData.points = []; obj68.userData.points.push(new PMPoint(4.6, 2.077, 2)); obj68.userData.points.push(new PMPoint(4.6, 1.923, 2)); obj68.userData.points.push(new PMPoint(2, 1.923, 2)); obj68.userData.points.push(new PMPoint(2, 2.077, 2)); obj68.userData.points.push(new PMPoint(2, 1.923, 4.6)); obj68.userData.points.push(new PMPoint(2, 2.077, 4.6)); obj68.userData.points.push(new PMPoint(4.6, 1.923, 4.6)); obj68.userData.points.push(new PMPoint(4.6, 2.077, 4.6)); obj68.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj68.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [3, 0, 1, 2], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj68.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj68); scene.add(obj68); var obj69 = new THREE.Object3D(); obj69.name = "_bounded"; obj69.userData.explodable = 1; obj69.userData.points = []; obj69.userData.points.push(new PMPoint(1.077, 0, 1)); obj69.userData.points.push(new PMPoint(1.077, 1, 1)); obj69.userData.points.push(new PMPoint(0.923, 0, 1)); obj69.userData.points.push(new PMPoint(0.923, 1, 1)); obj69.userData.points.push(new PMPoint(0.923, 1, 4.6)); obj69.userData.points.push(new PMPoint(0.923, 0, 4.6)); obj69.userData.points.push(new PMPoint(1.077, 1, 4.6)); obj69.userData.points.push(new PMPoint(1.077, 0, 4.6)); obj69.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj69.userData.facets = [[5, 2, 0, 7], [3, 2, 5, 4], [1, 3, 4, 6], [7, 0, 1, 6], [0, 2, 3, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj69.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj69); scene.add(obj69); var obj70 = new THREE.Object3D(); obj70.name = "_bounded"; obj70.userData.explodable = 1; obj70.userData.points = []; obj70.userData.points.push(new PMPoint(1, 0, 1.077)); obj70.userData.points.push(new PMPoint(1, 1, 1.077)); obj70.userData.points.push(new PMPoint(1, 0, 0.923)); obj70.userData.points.push(new PMPoint(1, 1, 0.923)); obj70.userData.points.push(new PMPoint(4.6, 1, 0.923)); obj70.userData.points.push(new PMPoint(4.6, 0, 0.923)); obj70.userData.points.push(new PMPoint(4.6, 1, 1.077)); obj70.userData.points.push(new PMPoint(4.6, 0, 1.077)); obj70.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj70.userData.facets = [[5, 2, 3, 4], [0, 2, 5, 7], [1, 0, 7, 6], [4, 3, 1, 6], [3, 2, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj70.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj70); scene.add(obj70); var obj71 = new THREE.Object3D(); obj71.name = "_bounded"; obj71.userData.explodable = 1; obj71.userData.points = []; obj71.userData.points.push(new PMPoint(1.94555, 2.05445, 2)); obj71.userData.points.push(new PMPoint(2.05445, 1.94555, 2)); obj71.userData.points.push(new PMPoint(1.05445, 0.945553, 1)); obj71.userData.points.push(new PMPoint(0.945553, 1.05445, 1)); obj71.userData.points.push(new PMPoint(1.05445, 0.945553, 4.6)); obj71.userData.points.push(new PMPoint(0.945553, 1.05445, 4.6)); obj71.userData.points.push(new PMPoint(2.05445, 1.94555, 4.6)); obj71.userData.points.push(new PMPoint(1.94555, 2.05445, 4.6)); obj71.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj71.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj71.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj71); scene.add(obj71); var obj72 = new THREE.Object3D(); obj72.name = "_bounded"; obj72.userData.explodable = 1; obj72.userData.points = []; obj72.userData.points.push(new PMPoint(4.6, 2, 2.077)); obj72.userData.points.push(new PMPoint(4.6, 2, 1.923)); obj72.userData.points.push(new PMPoint(2, 2, 1.923)); obj72.userData.points.push(new PMPoint(2, 2, 2.077)); obj72.userData.points.push(new PMPoint(2, 4.6, 1.923)); obj72.userData.points.push(new PMPoint(2, 4.6, 2.077)); obj72.userData.points.push(new PMPoint(4.6, 4.6, 1.923)); obj72.userData.points.push(new PMPoint(4.6, 4.6, 2.077)); obj72.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj72.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [0, 3, 2, 1], [1, 2, 4, 6], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj72.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj72); scene.add(obj72); var obj73 = new THREE.Object3D(); obj73.name = "_bounded"; obj73.userData.explodable = 1; obj73.userData.points = []; obj73.userData.points.push(new PMPoint(1.077, 1, 1)); obj73.userData.points.push(new PMPoint(1.077, 1, 0)); obj73.userData.points.push(new PMPoint(0.923, 1, 1)); obj73.userData.points.push(new PMPoint(0.923, 1, 0)); obj73.userData.points.push(new PMPoint(0.923, 4.6, 0)); obj73.userData.points.push(new PMPoint(0.923, 4.6, 1)); obj73.userData.points.push(new PMPoint(1.077, 4.6, 0)); obj73.userData.points.push(new PMPoint(1.077, 4.6, 1)); obj73.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj73.userData.facets = [[3, 4, 6, 1], [5, 4, 3, 2], [7, 5, 2, 0], [1, 6, 7, 0], [3, 1, 0, 2], [6, 4, 5, 7]]; <!-- Facet style --> obj73.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj73); scene.add(obj73); var obj74 = new THREE.Object3D(); obj74.name = "_bounded"; obj74.userData.explodable = 1; obj74.userData.points = []; obj74.userData.points.push(new PMPoint(1, 1.077, 1)); obj74.userData.points.push(new PMPoint(1, 1.077, 0)); obj74.userData.points.push(new PMPoint(1, 0.923, 1)); obj74.userData.points.push(new PMPoint(1, 0.923, 0)); obj74.userData.points.push(new PMPoint(4.6, 0.923, 0)); obj74.userData.points.push(new PMPoint(4.6, 0.923, 1)); obj74.userData.points.push(new PMPoint(4.6, 1.077, 0)); obj74.userData.points.push(new PMPoint(4.6, 1.077, 1)); obj74.userData.edgeindices = [0, 1, 0, 2, 1, 3, 2, 3, 3, 4, 2, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj74.userData.facets = [[4, 3, 1, 6], [2, 3, 4, 5], [0, 2, 5, 7], [6, 1, 0, 7], [1, 3, 2, 0], [4, 6, 7, 5]]; <!-- Facet style --> obj74.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj74); scene.add(obj74); var obj75 = new THREE.Object3D(); obj75.name = "_bounded"; obj75.userData.explodable = 1; obj75.userData.points = []; obj75.userData.points.push(new PMPoint(1.94555, 2, 2.05445)); obj75.userData.points.push(new PMPoint(2.05445, 2, 1.94555)); obj75.userData.points.push(new PMPoint(1.05445, 1, 0.945553)); obj75.userData.points.push(new PMPoint(0.945553, 1, 1.05445)); obj75.userData.points.push(new PMPoint(1.05445, 4.6, 0.945553)); obj75.userData.points.push(new PMPoint(0.945553, 4.6, 1.05445)); obj75.userData.points.push(new PMPoint(2.05445, 4.6, 1.94555)); obj75.userData.points.push(new PMPoint(1.94555, 4.6, 2.05445)); obj75.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj75.userData.facets = [[3, 5, 4, 2], [7, 5, 3, 0], [6, 7, 0, 1], [2, 4, 6, 1], [3, 2, 1, 0], [4, 5, 7, 6]]; <!-- Facet style --> obj75.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj75); scene.add(obj75); var obj76 = new THREE.Object3D(); obj76.name = "_bounded"; obj76.userData.explodable = 1; obj76.userData.points = []; obj76.userData.points.push(new PMPoint(2, 1.94555, 2.05445)); obj76.userData.points.push(new PMPoint(2, 2.05445, 1.94555)); obj76.userData.points.push(new PMPoint(1, 1.05445, 0.945553)); obj76.userData.points.push(new PMPoint(1, 0.945553, 1.05445)); obj76.userData.points.push(new PMPoint(4.6, 1.05445, 0.945553)); obj76.userData.points.push(new PMPoint(4.6, 0.945553, 1.05445)); obj76.userData.points.push(new PMPoint(4.6, 2.05445, 1.94555)); obj76.userData.points.push(new PMPoint(4.6, 1.94555, 2.05445)); obj76.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj76.userData.facets = [[5, 3, 2, 4], [0, 3, 5, 7], [1, 0, 7, 6], [4, 2, 1, 6], [2, 3, 0, 1], [5, 4, 6, 7]]; <!-- Facet style --> obj76.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj76); scene.add(obj76); var obj77 = new THREE.Object3D(); obj77.name = "_bounded"; obj77.userData.explodable = 1; obj77.userData.points = []; obj77.userData.points.push(new PMPoint(-2.077, 4.6, 0)); obj77.userData.points.push(new PMPoint(-1.923, 4.6, 0)); obj77.userData.points.push(new PMPoint(-1.923, 0, 0)); obj77.userData.points.push(new PMPoint(-2.077, 0, 0)); obj77.userData.points.push(new PMPoint(-1.923, 0, 4.6)); obj77.userData.points.push(new PMPoint(-2.077, 0, 4.6)); obj77.userData.points.push(new PMPoint(-1.923, 4.6, 4.6)); obj77.userData.points.push(new PMPoint(-2.077, 4.6, 4.6)); obj77.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj77.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj77.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj77); scene.add(obj77); var obj78 = new THREE.Object3D(); obj78.name = "_bounded"; obj78.userData.explodable = 1; obj78.userData.points = []; obj78.userData.points.push(new PMPoint(-1.05445, 0.0544472, 0)); obj78.userData.points.push(new PMPoint(-0.0544472, 1.05445, 1)); obj78.userData.points.push(new PMPoint(0.0544472, 0.945553, 1)); obj78.userData.points.push(new PMPoint(-0.945553, -0.0544472, 0)); obj78.userData.points.push(new PMPoint(0.0544472, 0.945553, 4.6)); obj78.userData.points.push(new PMPoint(-0.945553, -0.0544472, 4.6)); obj78.userData.points.push(new PMPoint(-0.0544472, 1.05445, 4.6)); obj78.userData.points.push(new PMPoint(-1.05445, 0.0544472, 4.6)); obj78.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj78.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj78.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj78); scene.add(obj78); var obj79 = new THREE.Object3D(); obj79.name = "_bounded"; obj79.userData.explodable = 1; obj79.userData.points = []; obj79.userData.points.push(new PMPoint(-1.05445, 0, 0.0544472)); obj79.userData.points.push(new PMPoint(-0.0544472, 1, 1.05445)); obj79.userData.points.push(new PMPoint(0.0544472, 1, 0.945553)); obj79.userData.points.push(new PMPoint(-0.945553, 0, -0.0544472)); obj79.userData.points.push(new PMPoint(0.0544472, 4.6, 0.945553)); obj79.userData.points.push(new PMPoint(-0.945553, 4.6, -0.0544472)); obj79.userData.points.push(new PMPoint(-0.0544472, 4.6, 1.05445)); obj79.userData.points.push(new PMPoint(-1.05445, 4.6, 0.0544472)); obj79.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj79.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj79.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj79); scene.add(obj79); var obj80 = new THREE.Object3D(); obj80.name = "_bounded"; obj80.userData.explodable = 1; obj80.userData.points = []; obj80.userData.points.push(new PMPoint(-0.077, 4.6, 1)); obj80.userData.points.push(new PMPoint(0.077, 4.6, 1)); obj80.userData.points.push(new PMPoint(0.077, 1, 1)); obj80.userData.points.push(new PMPoint(-0.077, 1, 1)); obj80.userData.points.push(new PMPoint(0.077, 1, 4.6)); obj80.userData.points.push(new PMPoint(-0.077, 1, 4.6)); obj80.userData.points.push(new PMPoint(0.077, 4.6, 4.6)); obj80.userData.points.push(new PMPoint(-0.077, 4.6, 4.6)); obj80.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj80.userData.facets = [[4, 2, 1, 6], [0, 3, 5, 7], [3, 2, 4, 5], [1, 2, 3, 0], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj80.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj80); scene.add(obj80); var obj81 = new THREE.Object3D(); obj81.name = "_bounded"; obj81.userData.explodable = 1; obj81.userData.points = []; obj81.userData.points.push(new PMPoint(4.6, -2.077, 0)); obj81.userData.points.push(new PMPoint(4.6, -1.923, 0)); obj81.userData.points.push(new PMPoint(0, -1.923, 0)); obj81.userData.points.push(new PMPoint(0, -2.077, 0)); obj81.userData.points.push(new PMPoint(0, -1.923, 4.6)); obj81.userData.points.push(new PMPoint(0, -2.077, 4.6)); obj81.userData.points.push(new PMPoint(4.6, -1.923, 4.6)); obj81.userData.points.push(new PMPoint(4.6, -2.077, 4.6)); obj81.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj81.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj81.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj81); scene.add(obj81); var obj82 = new THREE.Object3D(); obj82.name = "_bounded"; obj82.userData.explodable = 1; obj82.userData.points = []; obj82.userData.points.push(new PMPoint(0.0544472, -1.05445, 0)); obj82.userData.points.push(new PMPoint(1.05445, -0.0544472, 1)); obj82.userData.points.push(new PMPoint(0.945553, 0.0544472, 1)); obj82.userData.points.push(new PMPoint(-0.0544472, -0.945553, 0)); obj82.userData.points.push(new PMPoint(0.945553, 0.0544472, 4.6)); obj82.userData.points.push(new PMPoint(-0.0544472, -0.945553, 4.6)); obj82.userData.points.push(new PMPoint(1.05445, -0.0544472, 4.6)); obj82.userData.points.push(new PMPoint(0.0544472, -1.05445, 4.6)); obj82.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj82.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [1, 2, 4, 6], [7, 0, 1, 6], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj82.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj82); scene.add(obj82); var obj83 = new THREE.Object3D(); obj83.name = "_bounded"; obj83.userData.explodable = 1; obj83.userData.points = []; obj83.userData.points.push(new PMPoint(0, -1.05445, 0.0544472)); obj83.userData.points.push(new PMPoint(1, -0.0544472, 1.05445)); obj83.userData.points.push(new PMPoint(1, 0.0544472, 0.945553)); obj83.userData.points.push(new PMPoint(0, -0.945553, -0.0544472)); obj83.userData.points.push(new PMPoint(4.6, 0.0544472, 0.945553)); obj83.userData.points.push(new PMPoint(4.6, -0.945553, -0.0544472)); obj83.userData.points.push(new PMPoint(4.6, -0.0544472, 1.05445)); obj83.userData.points.push(new PMPoint(4.6, -1.05445, 0.0544472)); obj83.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj83.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj83.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj83); scene.add(obj83); var obj84 = new THREE.Object3D(); obj84.name = "_bounded"; obj84.userData.explodable = 1; obj84.userData.points = []; obj84.userData.points.push(new PMPoint(4.6, -0.077, 1)); obj84.userData.points.push(new PMPoint(4.6, 0.077, 1)); obj84.userData.points.push(new PMPoint(1, 0.077, 1)); obj84.userData.points.push(new PMPoint(1, -0.077, 1)); obj84.userData.points.push(new PMPoint(1, 0.077, 4.6)); obj84.userData.points.push(new PMPoint(1, -0.077, 4.6)); obj84.userData.points.push(new PMPoint(4.6, 0.077, 4.6)); obj84.userData.points.push(new PMPoint(4.6, -0.077, 4.6)); obj84.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj84.userData.facets = [[2, 4, 6, 1], [5, 4, 2, 3], [7, 5, 3, 0], [2, 1, 0, 3], [1, 6, 7, 0], [6, 4, 5, 7]]; <!-- Facet style --> obj84.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj84); scene.add(obj84); var obj85 = new THREE.Object3D(); obj85.name = "_bounded"; obj85.userData.explodable = 1; obj85.userData.points = []; obj85.userData.points.push(new PMPoint(4.6, 0, -2.077)); obj85.userData.points.push(new PMPoint(4.6, 0, -1.923)); obj85.userData.points.push(new PMPoint(0, 0, -1.923)); obj85.userData.points.push(new PMPoint(0, 0, -2.077)); obj85.userData.points.push(new PMPoint(0, 4.6, -1.923)); obj85.userData.points.push(new PMPoint(0, 4.6, -2.077)); obj85.userData.points.push(new PMPoint(4.6, 4.6, -1.923)); obj85.userData.points.push(new PMPoint(4.6, 4.6, -2.077)); obj85.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj85.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj85.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj85); scene.add(obj85); var obj86 = new THREE.Object3D(); obj86.name = "_bounded"; obj86.userData.explodable = 1; obj86.userData.points = []; obj86.userData.points.push(new PMPoint(0.0544472, 0, -1.05445)); obj86.userData.points.push(new PMPoint(1.05445, 1, -0.0544472)); obj86.userData.points.push(new PMPoint(0.945553, 1, 0.0544472)); obj86.userData.points.push(new PMPoint(-0.0544472, 0, -0.945553)); obj86.userData.points.push(new PMPoint(0.945553, 4.6, 0.0544472)); obj86.userData.points.push(new PMPoint(-0.0544472, 4.6, -0.945553)); obj86.userData.points.push(new PMPoint(1.05445, 4.6, -0.0544472)); obj86.userData.points.push(new PMPoint(0.0544472, 4.6, -1.05445)); obj86.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj86.userData.facets = [[3, 5, 7, 0], [4, 5, 3, 2], [6, 4, 2, 1], [0, 7, 6, 1], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj86.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj86); scene.add(obj86); var obj87 = new THREE.Object3D(); obj87.name = "_bounded"; obj87.userData.explodable = 1; obj87.userData.points = []; obj87.userData.points.push(new PMPoint(0, 0.0544472, -1.05445)); obj87.userData.points.push(new PMPoint(1, 1.05445, -0.0544472)); obj87.userData.points.push(new PMPoint(1, 0.945553, 0.0544472)); obj87.userData.points.push(new PMPoint(0, -0.0544472, -0.945553)); obj87.userData.points.push(new PMPoint(4.6, 0.945553, 0.0544472)); obj87.userData.points.push(new PMPoint(4.6, -0.0544472, -0.945553)); obj87.userData.points.push(new PMPoint(4.6, 1.05445, -0.0544472)); obj87.userData.points.push(new PMPoint(4.6, 0.0544472, -1.05445)); obj87.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj87.userData.facets = [[5, 3, 0, 7], [2, 3, 5, 4], [1, 2, 4, 6], [7, 0, 1, 6], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj87.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj87); scene.add(obj87); var obj88 = new THREE.Object3D(); obj88.name = "_bounded"; obj88.userData.explodable = 1; obj88.userData.points = []; obj88.userData.points.push(new PMPoint(4.6, 1, -0.077)); obj88.userData.points.push(new PMPoint(4.6, 1, 0.077)); obj88.userData.points.push(new PMPoint(1, 1, 0.077)); obj88.userData.points.push(new PMPoint(1, 1, -0.077)); obj88.userData.points.push(new PMPoint(1, 4.6, 0.077)); obj88.userData.points.push(new PMPoint(1, 4.6, -0.077)); obj88.userData.points.push(new PMPoint(4.6, 4.6, 0.077)); obj88.userData.points.push(new PMPoint(4.6, 4.6, -0.077)); obj88.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj88.userData.facets = [[4, 2, 1, 6], [3, 2, 4, 5], [1, 2, 3, 0], [0, 3, 5, 7], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj88.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj88); scene.add(obj88); var obj89 = new THREE.Object3D(); obj89.name = "_bounded"; obj89.userData.explodable = 1; obj89.userData.points = []; obj89.userData.points.push(new PMPoint(-2.05445, 0.0544472, 4.6)); obj89.userData.points.push(new PMPoint(-1.94555, -0.0544472, 4.6)); obj89.userData.points.push(new PMPoint(-1.94555, -0.0544472, 0)); obj89.userData.points.push(new PMPoint(-2.05445, 0.0544472, 0)); obj89.userData.points.push(new PMPoint(-4.6, -2.70889, -2.65445)); obj89.userData.points.push(new PMPoint(-4.6, -2.49111, -2.54555)); obj89.userData.points.push(new PMPoint(-4.6, -2.70889, 4.6)); obj89.userData.points.push(new PMPoint(-4.6, -2.49111, 4.6)); obj89.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj89.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [7, 0, 3, 5], [2, 4, 5, 3], [4, 6, 7, 5], [6, 1, 0, 7]]; <!-- Facet style --> obj89.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj89); scene.add(obj89); var obj90 = new THREE.Object3D(); obj90.name = "_bounded"; obj90.userData.explodable = 1; obj90.userData.points = []; obj90.userData.points.push(new PMPoint(-1.077, -1, 0)); obj90.userData.points.push(new PMPoint(-1.077, 0, 0)); obj90.userData.points.push(new PMPoint(-0.923, 0, 0)); obj90.userData.points.push(new PMPoint(-0.923, -1, 0)); obj90.userData.points.push(new PMPoint(-0.923, 0, 4.6)); obj90.userData.points.push(new PMPoint(-0.923, -1, 4.6)); obj90.userData.points.push(new PMPoint(-1.077, 0, 4.6)); obj90.userData.points.push(new PMPoint(-1.077, -1, 4.6)); obj90.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj90.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj90.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj90); scene.add(obj90); var obj91 = new THREE.Object3D(); obj91.name = "_bounded"; obj91.userData.explodable = 1; obj91.userData.points = []; obj91.userData.points.push(new PMPoint(-4.54555, -4.6, -3.65445)); obj91.userData.points.push(new PMPoint(-0.945553, 0, -0.0544472)); obj91.userData.points.push(new PMPoint(-0.945553, -1, -0.0544472)); obj91.userData.points.push(new PMPoint(-1.05445, -1, 0.0544472)); obj91.userData.points.push(new PMPoint(-1.05445, 0, 0.0544472)); obj91.userData.points.push(new PMPoint(-4.6, -3.54555, -3.49111)); obj91.userData.points.push(new PMPoint(-4.6, -4.54555, -3.49111)); obj91.userData.points.push(new PMPoint(-4.6, -3.65445, -3.70889)); obj91.userData.points.push(new PMPoint(-4.6, -4.6, -3.70889)); obj91.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj91.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj91.userData.facets = [[6, 3, 4, 5], [2, 3, 6, 9, 0], [1, 2, 0, 8, 7], [5, 4, 1, 7], [4, 3, 2, 1], [6, 5, 7, 8, 9], [9, 8, 0]]; <!-- Facet style --> obj91.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj91); scene.add(obj91); var obj92 = new THREE.Object3D(); obj92.name = "_bounded"; obj92.userData.explodable = 1; obj92.userData.points = []; obj92.userData.points.push(new PMPoint(-2, -0.077, 0)); obj92.userData.points.push(new PMPoint(-2, 0.077, 0)); obj92.userData.points.push(new PMPoint(-1, 0.077, 0)); obj92.userData.points.push(new PMPoint(-1, -0.077, 0)); obj92.userData.points.push(new PMPoint(-1, 0.077, 4.6)); obj92.userData.points.push(new PMPoint(-1, -0.077, 4.6)); obj92.userData.points.push(new PMPoint(-2, 0.077, 4.6)); obj92.userData.points.push(new PMPoint(-2, -0.077, 4.6)); obj92.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj92.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj92.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj92); scene.add(obj92); var obj93 = new THREE.Object3D(); obj93.name = "_bounded"; obj93.userData.explodable = 1; obj93.userData.points = []; obj93.userData.points.push(new PMPoint(-2.05445, 4.6, 0.0544472)); obj93.userData.points.push(new PMPoint(-1.94555, 4.6, -0.0544472)); obj93.userData.points.push(new PMPoint(-1.94555, 0, -0.0544472)); obj93.userData.points.push(new PMPoint(-2.05445, 0, 0.0544472)); obj93.userData.points.push(new PMPoint(-4.6, -2.65445, -2.70889)); obj93.userData.points.push(new PMPoint(-4.6, -2.54555, -2.49111)); obj93.userData.points.push(new PMPoint(-4.6, 4.6, -2.70889)); obj93.userData.points.push(new PMPoint(-4.6, 4.6, -2.49111)); obj93.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj93.userData.facets = [[1, 2, 4, 6], [3, 2, 1, 0], [4, 2, 3, 5], [5, 3, 0, 7], [6, 4, 5, 7], [1, 6, 7, 0]]; <!-- Facet style --> obj93.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj93); scene.add(obj93); var obj94 = new THREE.Object3D(); obj94.name = "_bounded"; obj94.userData.explodable = 1; obj94.userData.points = []; obj94.userData.points.push(new PMPoint(-1.077, 0, -1)); obj94.userData.points.push(new PMPoint(-1.077, 0, 0)); obj94.userData.points.push(new PMPoint(-0.923, 0, 0)); obj94.userData.points.push(new PMPoint(-0.923, 0, -1)); obj94.userData.points.push(new PMPoint(-0.923, 4.6, 0)); obj94.userData.points.push(new PMPoint(-0.923, 4.6, -1)); obj94.userData.points.push(new PMPoint(-1.077, 4.6, 0)); obj94.userData.points.push(new PMPoint(-1.077, 4.6, -1)); obj94.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj94.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj94.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj94); scene.add(obj94); var obj95 = new THREE.Object3D(); obj95.name = "_bounded"; obj95.userData.explodable = 1; obj95.userData.points = []; obj95.userData.points.push(new PMPoint(-4.54555, -3.65445, -4.6)); obj95.userData.points.push(new PMPoint(-0.945553, -0.0544472, 0)); obj95.userData.points.push(new PMPoint(-0.945553, -0.0544472, -1)); obj95.userData.points.push(new PMPoint(-1.05445, 0.0544472, -1)); obj95.userData.points.push(new PMPoint(-1.05445, 0.0544472, 0)); obj95.userData.points.push(new PMPoint(-4.6, -3.49111, -3.54555)); obj95.userData.points.push(new PMPoint(-4.6, -3.49111, -4.54555)); obj95.userData.points.push(new PMPoint(-4.6, -3.70889, -3.65445)); obj95.userData.points.push(new PMPoint(-4.6, -3.70889, -4.6)); obj95.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj95.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj95.userData.facets = [[6, 3, 2, 0, 9], [4, 3, 6, 5], [1, 4, 5, 7], [0, 2, 1, 7, 8], [2, 3, 4, 1], [6, 9, 8, 7, 5], [9, 0, 8]]; <!-- Facet style --> obj95.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj95); scene.add(obj95); var obj96 = new THREE.Object3D(); obj96.name = "_bounded"; obj96.userData.explodable = 1; obj96.userData.points = []; obj96.userData.points.push(new PMPoint(-2, 0, -0.077)); obj96.userData.points.push(new PMPoint(-2, 0, 0.077)); obj96.userData.points.push(new PMPoint(-1, 0, 0.077)); obj96.userData.points.push(new PMPoint(-1, 0, -0.077)); obj96.userData.points.push(new PMPoint(-1, 4.6, 0.077)); obj96.userData.points.push(new PMPoint(-1, 4.6, -0.077)); obj96.userData.points.push(new PMPoint(-2, 4.6, 0.077)); obj96.userData.points.push(new PMPoint(-2, 4.6, -0.077)); obj96.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj96.userData.facets = [[0, 7, 5, 3], [6, 7, 0, 1], [4, 6, 1, 2], [3, 5, 4, 2], [0, 3, 2, 1], [5, 7, 6, 4]]; <!-- Facet style --> obj96.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj96); scene.add(obj96); var obj97 = new THREE.Object3D(); obj97.name = "_bounded"; obj97.userData.explodable = 1; obj97.userData.points = []; obj97.userData.points.push(new PMPoint(-2, -0.0544472, 0.0544472)); obj97.userData.points.push(new PMPoint(-2, 0.0544472, -0.0544472)); obj97.userData.points.push(new PMPoint(-1, 0.0544472, -0.0544472)); obj97.userData.points.push(new PMPoint(-1, -0.0544472, 0.0544472)); obj97.userData.points.push(new PMPoint(-4.6, -3.54555, -3.65445)); obj97.userData.points.push(new PMPoint(-4.6, -3.65445, -3.54555)); obj97.userData.points.push(new PMPoint(-4.6, -2.54555, -2.65445)); obj97.userData.points.push(new PMPoint(-4.6, -2.65445, -2.54555)); obj97.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj97.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj97.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj97); scene.add(obj97); var obj98 = new THREE.Object3D(); obj98.name = "_bounded"; obj98.userData.explodable = 1; obj98.userData.points = []; obj98.userData.points.push(new PMPoint(0.0544472, -2.05445, 4.6)); obj98.userData.points.push(new PMPoint(-0.0544472, -1.94555, 4.6)); obj98.userData.points.push(new PMPoint(-0.0544472, -1.94555, 0)); obj98.userData.points.push(new PMPoint(0.0544472, -2.05445, 0)); obj98.userData.points.push(new PMPoint(-2.70889, -4.6, -2.65445)); obj98.userData.points.push(new PMPoint(-2.49111, -4.6, -2.54555)); obj98.userData.points.push(new PMPoint(-2.70889, -4.6, 4.6)); obj98.userData.points.push(new PMPoint(-2.49111, -4.6, 4.6)); obj98.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj98.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [6, 1, 2, 4], [3, 5, 4, 2], [5, 7, 6, 4], [7, 0, 1, 6]]; <!-- Facet style --> obj98.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj98); scene.add(obj98); var obj99 = new THREE.Object3D(); obj99.name = "_bounded"; obj99.userData.explodable = 1; obj99.userData.points = []; obj99.userData.points.push(new PMPoint(-1, -1.077, 0)); obj99.userData.points.push(new PMPoint(0, -1.077, 0)); obj99.userData.points.push(new PMPoint(0, -0.923, 0)); obj99.userData.points.push(new PMPoint(-1, -0.923, 0)); obj99.userData.points.push(new PMPoint(0, -0.923, 4.6)); obj99.userData.points.push(new PMPoint(-1, -0.923, 4.6)); obj99.userData.points.push(new PMPoint(0, -1.077, 4.6)); obj99.userData.points.push(new PMPoint(-1, -1.077, 4.6)); obj99.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj99.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj99.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj99); scene.add(obj99); var obj100 = new THREE.Object3D(); obj100.name = "_bounded"; obj100.userData.explodable = 1; obj100.userData.points = []; obj100.userData.points.push(new PMPoint(-4.54555, -4.6, -3.49111)); obj100.userData.points.push(new PMPoint(-3.54555, -4.6, -3.49111)); obj100.userData.points.push(new PMPoint(-3.65445, -4.6, -3.70889)); obj100.userData.points.push(new PMPoint(-1, -0.945553, -0.0544472)); obj100.userData.points.push(new PMPoint(0, -0.945553, -0.0544472)); obj100.userData.points.push(new PMPoint(0, -1.05445, 0.0544472)); obj100.userData.points.push(new PMPoint(-1, -1.05445, 0.0544472)); obj100.userData.points.push(new PMPoint(-4.6, -4.54555, -3.65445)); obj100.userData.points.push(new PMPoint(-4.6, -4.6, -3.70889)); obj100.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj100.userData.edgeindices = [0, 1, 1, 2, 2, 4, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 3, 7, 2, 8, 7, 8, 0, 9, 7, 9, 8, 9]; obj100.userData.facets = [[0, 6, 3, 7, 9], [5, 6, 0, 1], [4, 5, 1, 2], [7, 3, 4, 2, 8], [3, 6, 5, 4], [9, 7, 8], [0, 9, 8, 2, 1]]; <!-- Facet style --> obj100.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj100); scene.add(obj100); var obj101 = new THREE.Object3D(); obj101.name = "_bounded"; obj101.userData.explodable = 1; obj101.userData.points = []; obj101.userData.points.push(new PMPoint(-0.077, -2, 0)); obj101.userData.points.push(new PMPoint(0.077, -2, 0)); obj101.userData.points.push(new PMPoint(0.077, -1, 0)); obj101.userData.points.push(new PMPoint(-0.077, -1, 0)); obj101.userData.points.push(new PMPoint(0.077, -1, 4.6)); obj101.userData.points.push(new PMPoint(-0.077, -1, 4.6)); obj101.userData.points.push(new PMPoint(0.077, -2, 4.6)); obj101.userData.points.push(new PMPoint(-0.077, -2, 4.6)); obj101.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj101.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj101.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj101); scene.add(obj101); var obj102 = new THREE.Object3D(); obj102.name = "_bounded"; obj102.userData.explodable = 1; obj102.userData.points = []; obj102.userData.points.push(new PMPoint(-4.49111, -4.6, 4.6)); obj102.userData.points.push(new PMPoint(-4.49111, -4.6, -3.54555)); obj102.userData.points.push(new PMPoint(-1.05445, -0.945553, 0)); obj102.userData.points.push(new PMPoint(-0.945553, -1.05445, 0)); obj102.userData.points.push(new PMPoint(-0.945553, -1.05445, 4.6)); obj102.userData.points.push(new PMPoint(-1.05445, -0.945553, 4.6)); obj102.userData.points.push(new PMPoint(-4.6, -4.49111, 4.6)); obj102.userData.points.push(new PMPoint(-4.6, -4.49111, -3.54555)); obj102.userData.points.push(new PMPoint(-4.6, -4.6, -3.6)); obj102.userData.points.push(new PMPoint(-4.6, -4.6, 4.6)); obj102.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj102.userData.facets = [[3, 4, 0, 1], [5, 4, 3, 2], [6, 5, 2, 7], [3, 1, 8, 7, 2], [9, 6, 7, 8], [1, 0, 9, 8], [0, 4, 5, 6, 9]]; <!-- Facet style --> obj102.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj102); scene.add(obj102); var obj103 = new THREE.Object3D(); obj103.name = "_bounded"; obj103.userData.explodable = 1; obj103.userData.points = []; obj103.userData.points.push(new PMPoint(0.0544472, 4.6, -2.05445)); obj103.userData.points.push(new PMPoint(-0.0544472, 4.6, -1.94555)); obj103.userData.points.push(new PMPoint(-0.0544472, 0, -1.94555)); obj103.userData.points.push(new PMPoint(0.0544472, 0, -2.05445)); obj103.userData.points.push(new PMPoint(-2.70889, -2.65445, -4.6)); obj103.userData.points.push(new PMPoint(-2.49111, -2.54555, -4.6)); obj103.userData.points.push(new PMPoint(-2.70889, 4.6, -4.6)); obj103.userData.points.push(new PMPoint(-2.49111, 4.6, -4.6)); obj103.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj103.userData.facets = [[0, 3, 5, 7], [2, 3, 0, 1], [5, 3, 2, 4], [4, 2, 1, 6], [0, 7, 6, 1], [7, 5, 4, 6]]; <!-- Facet style --> obj103.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj103); scene.add(obj103); var obj104 = new THREE.Object3D(); obj104.name = "_bounded"; obj104.userData.explodable = 1; obj104.userData.points = []; obj104.userData.points.push(new PMPoint(-1, 0, -1.077)); obj104.userData.points.push(new PMPoint(0, 0, -1.077)); obj104.userData.points.push(new PMPoint(0, 0, -0.923)); obj104.userData.points.push(new PMPoint(-1, 0, -0.923)); obj104.userData.points.push(new PMPoint(0, 4.6, -0.923)); obj104.userData.points.push(new PMPoint(-1, 4.6, -0.923)); obj104.userData.points.push(new PMPoint(0, 4.6, -1.077)); obj104.userData.points.push(new PMPoint(-1, 4.6, -1.077)); obj104.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj104.userData.facets = [[0, 7, 6, 1], [5, 7, 0, 3], [4, 5, 3, 2], [1, 6, 4, 2], [0, 1, 2, 3], [6, 7, 5, 4]]; <!-- Facet style --> obj104.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj104); scene.add(obj104); var obj105 = new THREE.Object3D(); obj105.name = "_bounded"; obj105.userData.explodable = 1; obj105.userData.points = []; obj105.userData.points.push(new PMPoint(-4.54555, -3.49111, -4.6)); obj105.userData.points.push(new PMPoint(-3.54555, -3.49111, -4.6)); obj105.userData.points.push(new PMPoint(-3.65445, -3.70889, -4.6)); obj105.userData.points.push(new PMPoint(-1, -0.0544472, -0.945553)); obj105.userData.points.push(new PMPoint(0, -0.0544472, -0.945553)); obj105.userData.points.push(new PMPoint(0, 0.0544472, -1.05445)); obj105.userData.points.push(new PMPoint(-1, 0.0544472, -1.05445)); obj105.userData.points.push(new PMPoint(-4.6, -3.65445, -4.54555)); obj105.userData.points.push(new PMPoint(-4.6, -3.70889, -4.6)); obj105.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj105.userData.edgeindices = [0, 1, 1, 2, 2, 4, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 3, 7, 2, 8, 7, 8, 0, 9, 7, 9, 8, 9]; obj105.userData.facets = [[7, 3, 6, 0, 9], [4, 3, 7, 8, 2], [5, 4, 2, 1], [0, 6, 5, 1], [6, 3, 4, 5], [7, 9, 8], [9, 0, 1, 2, 8]]; <!-- Facet style --> obj105.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj105); scene.add(obj105); var obj106 = new THREE.Object3D(); obj106.name = "_bounded"; obj106.userData.explodable = 1; obj106.userData.points = []; obj106.userData.points.push(new PMPoint(-0.077, 0, -2)); obj106.userData.points.push(new PMPoint(0.077, 0, -2)); obj106.userData.points.push(new PMPoint(0.077, 0, -1)); obj106.userData.points.push(new PMPoint(-0.077, 0, -1)); obj106.userData.points.push(new PMPoint(0.077, 4.6, -1)); obj106.userData.points.push(new PMPoint(-0.077, 4.6, -1)); obj106.userData.points.push(new PMPoint(0.077, 4.6, -2)); obj106.userData.points.push(new PMPoint(-0.077, 4.6, -2)); obj106.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj106.userData.facets = [[0, 7, 6, 1], [5, 7, 0, 3], [4, 5, 3, 2], [1, 6, 4, 2], [0, 1, 2, 3], [6, 7, 5, 4]]; <!-- Facet style --> obj106.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj106); scene.add(obj106); var obj107 = new THREE.Object3D(); obj107.name = "_bounded"; obj107.userData.explodable = 1; obj107.userData.points = []; obj107.userData.points.push(new PMPoint(-4.49111, 4.6, -4.6)); obj107.userData.points.push(new PMPoint(-4.49111, -3.54555, -4.6)); obj107.userData.points.push(new PMPoint(-1.05445, 0, -0.945553)); obj107.userData.points.push(new PMPoint(-0.945553, 0, -1.05445)); obj107.userData.points.push(new PMPoint(-0.945553, 4.6, -1.05445)); obj107.userData.points.push(new PMPoint(-1.05445, 4.6, -0.945553)); obj107.userData.points.push(new PMPoint(-4.6, 4.6, -4.49111)); obj107.userData.points.push(new PMPoint(-4.6, -3.54555, -4.49111)); obj107.userData.points.push(new PMPoint(-4.6, -3.6, -4.6)); obj107.userData.points.push(new PMPoint(-4.6, 4.6, -4.6)); obj107.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj107.userData.facets = [[4, 3, 1, 0], [2, 3, 4, 5], [1, 3, 2, 7, 8], [7, 2, 5, 6], [8, 7, 6, 9], [4, 0, 9, 6, 5], [0, 1, 8, 9]]; <!-- Facet style --> obj107.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj107); scene.add(obj107); var obj108 = new THREE.Object3D(); obj108.name = "_bounded"; obj108.userData.explodable = 1; obj108.userData.points = []; obj108.userData.points.push(new PMPoint(4.6, -2.05445, 0.0544472)); obj108.userData.points.push(new PMPoint(4.6, -1.94555, -0.0544472)); obj108.userData.points.push(new PMPoint(0, -1.94555, -0.0544472)); obj108.userData.points.push(new PMPoint(0, -2.05445, 0.0544472)); obj108.userData.points.push(new PMPoint(-2.65445, -4.6, -2.70889)); obj108.userData.points.push(new PMPoint(-2.54555, -4.6, -2.49111)); obj108.userData.points.push(new PMPoint(4.6, -4.6, -2.70889)); obj108.userData.points.push(new PMPoint(4.6, -4.6, -2.49111)); obj108.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj108.userData.facets = [[2, 1, 6, 4], [0, 1, 2, 3], [2, 4, 5, 3], [7, 0, 3, 5], [6, 1, 0, 7], [4, 6, 7, 5]]; <!-- Facet style --> obj108.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj108); scene.add(obj108); var obj109 = new THREE.Object3D(); obj109.name = "_bounded"; obj109.userData.explodable = 1; obj109.userData.points = []; obj109.userData.points.push(new PMPoint(0, -1.077, -1)); obj109.userData.points.push(new PMPoint(0, -1.077, 0)); obj109.userData.points.push(new PMPoint(0, -0.923, 0)); obj109.userData.points.push(new PMPoint(0, -0.923, -1)); obj109.userData.points.push(new PMPoint(4.6, -0.923, 0)); obj109.userData.points.push(new PMPoint(4.6, -0.923, -1)); obj109.userData.points.push(new PMPoint(4.6, -1.077, 0)); obj109.userData.points.push(new PMPoint(4.6, -1.077, -1)); obj109.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj109.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj109.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj109); scene.add(obj109); var obj110 = new THREE.Object3D(); obj110.name = "_bounded"; obj110.userData.explodable = 1; obj110.userData.points = []; obj110.userData.points.push(new PMPoint(-3.65445, -4.54555, -4.6)); obj110.userData.points.push(new PMPoint(-0.0544472, -0.945553, 0)); obj110.userData.points.push(new PMPoint(-0.0544472, -0.945553, -1)); obj110.userData.points.push(new PMPoint(0.0544472, -1.05445, -1)); obj110.userData.points.push(new PMPoint(0.0544472, -1.05445, 0)); obj110.userData.points.push(new PMPoint(-3.49111, -4.6, -3.54555)); obj110.userData.points.push(new PMPoint(-3.49111, -4.6, -4.54555)); obj110.userData.points.push(new PMPoint(-3.70889, -4.6, -3.65445)); obj110.userData.points.push(new PMPoint(-3.70889, -4.6, -4.6)); obj110.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj110.userData.edgeindices = [0, 2, 1, 2, 2, 3, 1, 4, 3, 4, 4, 5, 3, 6, 5, 6, 1, 7, 5, 7, 0, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj110.userData.facets = [[0, 2, 3, 6, 9], [1, 2, 0, 8, 7], [4, 1, 7, 5], [6, 3, 4, 5], [3, 2, 1, 4], [9, 6, 5, 7, 8], [0, 9, 8]]; <!-- Facet style --> obj110.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj110); scene.add(obj110); var obj111 = new THREE.Object3D(); obj111.name = "_bounded"; obj111.userData.explodable = 1; obj111.userData.points = []; obj111.userData.points.push(new PMPoint(0, -2, -0.077)); obj111.userData.points.push(new PMPoint(0, -2, 0.077)); obj111.userData.points.push(new PMPoint(0, -1, 0.077)); obj111.userData.points.push(new PMPoint(0, -1, -0.077)); obj111.userData.points.push(new PMPoint(4.6, -1, 0.077)); obj111.userData.points.push(new PMPoint(4.6, -1, -0.077)); obj111.userData.points.push(new PMPoint(4.6, -2, 0.077)); obj111.userData.points.push(new PMPoint(4.6, -2, -0.077)); obj111.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj111.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj111.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj111); scene.add(obj111); var obj112 = new THREE.Object3D(); obj112.name = "_bounded"; obj112.userData.explodable = 1; obj112.userData.points = []; obj112.userData.points.push(new PMPoint(-0.0544472, -2, 0.0544472)); obj112.userData.points.push(new PMPoint(0.0544472, -2, -0.0544472)); obj112.userData.points.push(new PMPoint(0.0544472, -1, -0.0544472)); obj112.userData.points.push(new PMPoint(-0.0544472, -1, 0.0544472)); obj112.userData.points.push(new PMPoint(-3.54555, -4.6, -3.65445)); obj112.userData.points.push(new PMPoint(-3.65445, -4.6, -3.54555)); obj112.userData.points.push(new PMPoint(-2.54555, -4.6, -2.65445)); obj112.userData.points.push(new PMPoint(-2.65445, -4.6, -2.54555)); obj112.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj112.userData.facets = [[7, 0, 3, 5], [1, 0, 7, 6], [2, 1, 6, 4], [5, 3, 2, 4], [3, 0, 1, 2], [7, 5, 4, 6]]; <!-- Facet style --> obj112.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj112); scene.add(obj112); var obj113 = new THREE.Object3D(); obj113.name = "_bounded"; obj113.userData.explodable = 1; obj113.userData.points = []; obj113.userData.points.push(new PMPoint(4.6, 0.0544472, -2.05445)); obj113.userData.points.push(new PMPoint(4.6, -0.0544472, -1.94555)); obj113.userData.points.push(new PMPoint(0, -0.0544472, -1.94555)); obj113.userData.points.push(new PMPoint(0, 0.0544472, -2.05445)); obj113.userData.points.push(new PMPoint(-2.65445, -2.70889, -4.6)); obj113.userData.points.push(new PMPoint(-2.54555, -2.49111, -4.6)); obj113.userData.points.push(new PMPoint(4.6, -2.70889, -4.6)); obj113.userData.points.push(new PMPoint(4.6, -2.49111, -4.6)); obj113.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj113.userData.facets = [[3, 0, 7, 5], [1, 0, 3, 2], [3, 5, 4, 2], [6, 1, 2, 4], [7, 0, 1, 6], [5, 7, 6, 4]]; <!-- Facet style --> obj113.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj113); scene.add(obj113); var obj114 = new THREE.Object3D(); obj114.name = "_bounded"; obj114.userData.explodable = 1; obj114.userData.points = []; obj114.userData.points.push(new PMPoint(0, -1, -1.077)); obj114.userData.points.push(new PMPoint(0, 0, -1.077)); obj114.userData.points.push(new PMPoint(0, 0, -0.923)); obj114.userData.points.push(new PMPoint(0, -1, -0.923)); obj114.userData.points.push(new PMPoint(4.6, 0, -0.923)); obj114.userData.points.push(new PMPoint(4.6, -1, -0.923)); obj114.userData.points.push(new PMPoint(4.6, 0, -1.077)); obj114.userData.points.push(new PMPoint(4.6, -1, -1.077)); obj114.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj114.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj114.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj114); scene.add(obj114); var obj115 = new THREE.Object3D(); obj115.name = "_bounded"; obj115.userData.explodable = 1; obj115.userData.points = []; obj115.userData.points.push(new PMPoint(-3.49111, -3.54555, -4.6)); obj115.userData.points.push(new PMPoint(-3.49111, -4.54555, -4.6)); obj115.userData.points.push(new PMPoint(-3.70889, -3.65445, -4.6)); obj115.userData.points.push(new PMPoint(-0.0544472, 0, -0.945553)); obj115.userData.points.push(new PMPoint(-0.0544472, -1, -0.945553)); obj115.userData.points.push(new PMPoint(0.0544472, -1, -1.05445)); obj115.userData.points.push(new PMPoint(0.0544472, 0, -1.05445)); obj115.userData.points.push(new PMPoint(-3.65445, -4.6, -4.54555)); obj115.userData.points.push(new PMPoint(-3.70889, -4.6, -4.6)); obj115.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj115.userData.edgeindices = [0, 1, 0, 2, 2, 3, 3, 4, 1, 5, 4, 5, 0, 6, 3, 6, 5, 6, 4, 7, 2, 8, 7, 8, 1, 9, 7, 9, 8, 9]; obj115.userData.facets = [[7, 4, 3, 2, 8], [5, 4, 7, 9, 1], [6, 5, 1, 0], [2, 3, 6, 0], [3, 4, 5, 6], [7, 8, 9], [8, 2, 0, 1, 9]]; <!-- Facet style --> obj115.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj115); scene.add(obj115); var obj116 = new THREE.Object3D(); obj116.name = "_bounded"; obj116.userData.explodable = 1; obj116.userData.points = []; obj116.userData.points.push(new PMPoint(0, -0.077, -2)); obj116.userData.points.push(new PMPoint(0, 0.077, -2)); obj116.userData.points.push(new PMPoint(0, 0.077, -1)); obj116.userData.points.push(new PMPoint(0, -0.077, -1)); obj116.userData.points.push(new PMPoint(4.6, 0.077, -1)); obj116.userData.points.push(new PMPoint(4.6, -0.077, -1)); obj116.userData.points.push(new PMPoint(4.6, 0.077, -2)); obj116.userData.points.push(new PMPoint(4.6, -0.077, -2)); obj116.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj116.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj116.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj116); scene.add(obj116); var obj117 = new THREE.Object3D(); obj117.name = "_bounded"; obj117.userData.explodable = 1; obj117.userData.points = []; obj117.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -2)); obj117.userData.points.push(new PMPoint(0.0544472, -0.0544472, -2)); obj117.userData.points.push(new PMPoint(0.0544472, -0.0544472, -1)); obj117.userData.points.push(new PMPoint(-0.0544472, 0.0544472, -1)); obj117.userData.points.push(new PMPoint(-3.54555, -3.65445, -4.6)); obj117.userData.points.push(new PMPoint(-3.65445, -3.54555, -4.6)); obj117.userData.points.push(new PMPoint(-2.54555, -2.65445, -4.6)); obj117.userData.points.push(new PMPoint(-2.65445, -2.54555, -4.6)); obj117.userData.edgeindices = [0, 1, 1, 2, 0, 3, 2, 3, 2, 4, 3, 5, 4, 5, 1, 6, 4, 6, 0, 7, 5, 7, 6, 7]; obj117.userData.facets = [[7, 0, 1, 6], [3, 0, 7, 5], [2, 3, 5, 4], [6, 1, 2, 4], [1, 0, 3, 2], [7, 6, 4, 5]]; <!-- Facet style --> obj117.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj117); scene.add(obj117); var obj118 = new THREE.Object3D(); obj118.name = "_bounded"; obj118.userData.explodable = 1; obj118.userData.points = []; obj118.userData.points.push(new PMPoint(4.6, -4.49111, -4.6)); obj118.userData.points.push(new PMPoint(-3.54555, -4.49111, -4.6)); obj118.userData.points.push(new PMPoint(0, -1.05445, -0.945553)); obj118.userData.points.push(new PMPoint(0, -0.945553, -1.05445)); obj118.userData.points.push(new PMPoint(4.6, -0.945553, -1.05445)); obj118.userData.points.push(new PMPoint(4.6, -1.05445, -0.945553)); obj118.userData.points.push(new PMPoint(4.6, -4.6, -4.49111)); obj118.userData.points.push(new PMPoint(-3.54555, -4.6, -4.49111)); obj118.userData.points.push(new PMPoint(-3.6, -4.6, -4.6)); obj118.userData.points.push(new PMPoint(4.6, -4.6, -4.6)); obj118.userData.edgeindices = [0, 1, 1, 3, 2, 3, 0, 4, 3, 4, 2, 5, 4, 5, 5, 6, 2, 7, 6, 7, 1, 8, 7, 8, 0, 9, 6, 9, 8, 9]; obj118.userData.facets = [[3, 4, 0, 1], [5, 4, 3, 2], [3, 1, 8, 7, 2], [6, 5, 2, 7], [0, 4, 5, 6, 9], [9, 6, 7, 8], [1, 0, 9, 8]]; <!-- Facet style --> obj118.userData.facetmaterial = [new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0x77EC9E, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } ), new THREE.MeshBasicMaterial( { color: 0xFF0000, depthFunc: THREE.LessDepth, depthWrite: false, opacity: 1, polygonOffset: true, polygonOffsetFactor: 1, polygonOffsetUnits: 0.5, side: THREE.DoubleSide, transparent: true } )]; init_object(obj118); scene.add(obj118); var obj119 = new THREE.Object3D(); obj119.name = "unnamed__12"; obj119.userData.explodable = 1; obj119.userData.points = []; obj119.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj119.userData.points.push(new PMPoint(-1, -0.875, 0)); obj119.userData.pointradii = 0.05775; <!-- Vertex style --> obj119.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj119.userData.edgeindices = [1, 0]; <!-- Edge style --> obj119.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj119); scene.add(obj119); var obj120 = new THREE.Object3D(); obj120.name = "unnamed__13"; obj120.userData.explodable = 1; obj120.userData.points = []; obj120.userData.points.push(new PMPoint(-1, -0.875, 0)); obj120.userData.points.push(new PMPoint(-1, -0.875, 6)); obj120.userData.pointradii = 0.05775; <!-- Vertex style --> obj120.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj120.userData.edgeindices = [1, 0]; <!-- Edge style --> obj120.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj120); scene.add(obj120); var obj121 = new THREE.Object3D(); obj121.name = "unnamed__14"; obj121.userData.explodable = 1; obj121.userData.points = []; obj121.userData.points.push(new PMPoint(-1, -0.875, 0)); obj121.userData.points.push(new PMPoint(-6, -5.875, -5)); obj121.userData.pointradii = 0.05775; <!-- Vertex style --> obj121.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj121.userData.edgeindices = [1, 0]; <!-- Edge style --> obj121.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj121); scene.add(obj121); var obj122 = new THREE.Object3D(); obj122.name = "unnamed__15"; obj122.userData.explodable = 1; obj122.userData.points = []; obj122.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj122.userData.points.push(new PMPoint(-1, 0, -0.75)); obj122.userData.pointradii = 0.05775; <!-- Vertex style --> obj122.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj122.userData.edgeindices = [1, 0]; <!-- Edge style --> obj122.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj122); scene.add(obj122); var obj123 = new THREE.Object3D(); obj123.name = "unnamed__16"; obj123.userData.explodable = 1; obj123.userData.points = []; obj123.userData.points.push(new PMPoint(-1, 0, -0.75)); obj123.userData.points.push(new PMPoint(-1, 6, -0.75)); obj123.userData.pointradii = 0.05775; <!-- Vertex style --> obj123.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj123.userData.edgeindices = [1, 0]; <!-- Edge style --> obj123.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj123); scene.add(obj123); var obj124 = new THREE.Object3D(); obj124.name = "unnamed__17"; obj124.userData.explodable = 1; obj124.userData.points = []; obj124.userData.points.push(new PMPoint(-1, 0, -0.75)); obj124.userData.points.push(new PMPoint(-6, -5, -5.75)); obj124.userData.pointradii = 0.05775; <!-- Vertex style --> obj124.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj124.userData.edgeindices = [1, 0]; <!-- Edge style --> obj124.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj124); scene.add(obj124); var obj125 = new THREE.Object3D(); obj125.name = "unnamed__18"; obj125.userData.explodable = 1; obj125.userData.points = []; obj125.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj125.userData.points.push(new PMPoint(0, -1, -0.875)); obj125.userData.pointradii = 0.05775; <!-- Vertex style --> obj125.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj125.userData.edgeindices = [1, 0]; <!-- Edge style --> obj125.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj125); scene.add(obj125); var obj126 = new THREE.Object3D(); obj126.name = "unnamed__19"; obj126.userData.explodable = 1; obj126.userData.points = []; obj126.userData.points.push(new PMPoint(0, -1, -0.875)); obj126.userData.points.push(new PMPoint(6, -1, -0.875)); obj126.userData.pointradii = 0.05775; <!-- Vertex style --> obj126.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj126.userData.edgeindices = [1, 0]; <!-- Edge style --> obj126.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj126); scene.add(obj126); var obj127 = new THREE.Object3D(); obj127.name = "unnamed__20"; obj127.userData.explodable = 1; obj127.userData.points = []; obj127.userData.points.push(new PMPoint(0, -1, -0.875)); obj127.userData.points.push(new PMPoint(-5, -6, -5.875)); obj127.userData.pointradii = 0.05775; <!-- Vertex style --> obj127.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj127.userData.edgeindices = [1, 0]; <!-- Edge style --> obj127.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj127); scene.add(obj127); var obj128 = new THREE.Object3D(); obj128.name = "unnamed__21"; obj128.userData.explodable = 1; obj128.userData.points = []; obj128.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj128.userData.points.push(new PMPoint(-0.5, 0, 0)); obj128.userData.pointradii = 0.05775; <!-- Vertex style --> obj128.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj128.userData.edgeindices = [1, 0]; <!-- Edge style --> obj128.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj128); scene.add(obj128); var obj129 = new THREE.Object3D(); obj129.name = "unnamed__22"; obj129.userData.explodable = 1; obj129.userData.points = []; obj129.userData.points.push(new PMPoint(-0.5, 0, 0)); obj129.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj129.userData.pointradii = 0.05775; <!-- Vertex style --> obj129.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj129.userData.edgeindices = [1, 0]; <!-- Edge style --> obj129.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj129); scene.add(obj129); var obj130 = new THREE.Object3D(); obj130.name = "unnamed__23"; obj130.userData.explodable = 1; obj130.userData.points = []; obj130.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj130.userData.points.push(new PMPoint(-0.5, 0.5, 6)); obj130.userData.pointradii = 0.05775; <!-- Vertex style --> obj130.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj130.userData.edgeindices = [1, 0]; <!-- Edge style --> obj130.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj130); scene.add(obj130); var obj131 = new THREE.Object3D(); obj131.name = "unnamed__24"; obj131.userData.explodable = 1; obj131.userData.points = []; obj131.userData.points.push(new PMPoint(-0.5, 0.5, 0.5)); obj131.userData.points.push(new PMPoint(-0.5, 6, 0.5)); obj131.userData.pointradii = 0.05775; <!-- Vertex style --> obj131.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj131.userData.edgeindices = [1, 0]; <!-- Edge style --> obj131.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj131); scene.add(obj131); var obj132 = new THREE.Object3D(); obj132.name = "unnamed__25"; obj132.userData.explodable = 1; obj132.userData.points = []; obj132.userData.points.push(new PMPoint(2, 2, 2.25)); obj132.userData.points.push(new PMPoint(2, 2, 6)); obj132.userData.pointradii = 0.05775; <!-- Vertex style --> obj132.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj132.userData.edgeindices = [1, 0]; <!-- Edge style --> obj132.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj132); scene.add(obj132); var obj133 = new THREE.Object3D(); obj133.name = "unnamed__26"; obj133.userData.explodable = 1; obj133.userData.points = []; obj133.userData.points.push(new PMPoint(2, 2, 2.25)); obj133.userData.points.push(new PMPoint(6, 2, 2.25)); obj133.userData.pointradii = 0.05775; <!-- Vertex style --> obj133.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj133.userData.edgeindices = [1, 0]; <!-- Edge style --> obj133.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj133); scene.add(obj133); var obj134 = new THREE.Object3D(); obj134.name = "unnamed__27"; obj134.userData.explodable = 1; obj134.userData.points = []; obj134.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj134.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj134.userData.pointradii = 0.05775; <!-- Vertex style --> obj134.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj134.userData.edgeindices = [1, 0]; <!-- Edge style --> obj134.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj134); scene.add(obj134); var obj135 = new THREE.Object3D(); obj135.name = "unnamed__28"; obj135.userData.explodable = 1; obj135.userData.points = []; obj135.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj135.userData.points.push(new PMPoint(0, -0.5, 0)); obj135.userData.pointradii = 0.05775; <!-- Vertex style --> obj135.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj135.userData.edgeindices = [1, 0]; <!-- Edge style --> obj135.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj135); scene.add(obj135); var obj136 = new THREE.Object3D(); obj136.name = "unnamed__29"; obj136.userData.explodable = 1; obj136.userData.points = []; obj136.userData.points.push(new PMPoint(-0.625, -0.5, 0)); obj136.userData.points.push(new PMPoint(0, -0.5, 0)); obj136.userData.pointradii = 0.05775; <!-- Vertex style --> obj136.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj136.userData.edgeindices = [1, 0]; <!-- Edge style --> obj136.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj136); scene.add(obj136); var obj137 = new THREE.Object3D(); obj137.name = "unnamed__30"; obj137.userData.explodable = 1; obj137.userData.points = []; obj137.userData.points.push(new PMPoint(0, -0.5, 0)); obj137.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj137.userData.pointradii = 0.05775; <!-- Vertex style --> obj137.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj137.userData.edgeindices = [1, 0]; <!-- Edge style --> obj137.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj137); scene.add(obj137); var obj138 = new THREE.Object3D(); obj138.name = "unnamed__31"; obj138.userData.explodable = 1; obj138.userData.points = []; obj138.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj138.userData.points.push(new PMPoint(0.5, -0.5, 6)); obj138.userData.pointradii = 0.05775; <!-- Vertex style --> obj138.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj138.userData.edgeindices = [1, 0]; <!-- Edge style --> obj138.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj138); scene.add(obj138); var obj139 = new THREE.Object3D(); obj139.name = "unnamed__32"; obj139.userData.explodable = 1; obj139.userData.points = []; obj139.userData.points.push(new PMPoint(0.5, -0.5, 0.5)); obj139.userData.points.push(new PMPoint(6, -0.5, 0.5)); obj139.userData.pointradii = 0.05775; <!-- Vertex style --> obj139.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj139.userData.edgeindices = [1, 0]; <!-- Edge style --> obj139.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj139); scene.add(obj139); var obj140 = new THREE.Object3D(); obj140.name = "unnamed__33"; obj140.userData.explodable = 1; obj140.userData.points = []; obj140.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj140.userData.points.push(new PMPoint(0.75, 1, 6)); obj140.userData.pointradii = 0.05775; <!-- Vertex style --> obj140.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj140.userData.edgeindices = [1, 0]; <!-- Edge style --> obj140.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj140); scene.add(obj140); var obj141 = new THREE.Object3D(); obj141.name = "unnamed__34"; obj141.userData.explodable = 1; obj141.userData.points = []; obj141.userData.points.push(new PMPoint(2, 2, 2.25)); obj141.userData.points.push(new PMPoint(2, 6, 2.25)); obj141.userData.pointradii = 0.05775; <!-- Vertex style --> obj141.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj141.userData.edgeindices = [1, 0]; <!-- Edge style --> obj141.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj141); scene.add(obj141); var obj142 = new THREE.Object3D(); obj142.name = "unnamed__35"; obj142.userData.explodable = 1; obj142.userData.points = []; obj142.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj142.userData.points.push(new PMPoint(-0.5, 0, 0)); obj142.userData.pointradii = 0.05775; <!-- Vertex style --> obj142.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj142.userData.edgeindices = [1, 0]; <!-- Edge style --> obj142.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj142); scene.add(obj142); var obj143 = new THREE.Object3D(); obj143.name = "unnamed__36"; obj143.userData.explodable = 1; obj143.userData.points = []; obj143.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj143.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj143.userData.pointradii = 0.05775; <!-- Vertex style --> obj143.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj143.userData.edgeindices = [1, 0]; <!-- Edge style --> obj143.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj143); scene.add(obj143); var obj144 = new THREE.Object3D(); obj144.name = "unnamed__37"; obj144.userData.explodable = 1; obj144.userData.points = []; obj144.userData.points.push(new PMPoint(0, 0, -0.5)); obj144.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj144.userData.pointradii = 0.05775; <!-- Vertex style --> obj144.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj144.userData.edgeindices = [1, 0]; <!-- Edge style --> obj144.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj144); scene.add(obj144); var obj145 = new THREE.Object3D(); obj145.name = "unnamed__38"; obj145.userData.explodable = 1; obj145.userData.points = []; obj145.userData.points.push(new PMPoint(-0.75, 0, -0.5)); obj145.userData.points.push(new PMPoint(0, 0, -0.5)); obj145.userData.pointradii = 0.05775; <!-- Vertex style --> obj145.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj145.userData.edgeindices = [1, 0]; <!-- Edge style --> obj145.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj145); scene.add(obj145); var obj146 = new THREE.Object3D(); obj146.name = "unnamed__39"; obj146.userData.explodable = 1; obj146.userData.points = []; obj146.userData.points.push(new PMPoint(0, -0.625, -0.5)); obj146.userData.points.push(new PMPoint(0, 0, -0.5)); obj146.userData.pointradii = 0.05775; <!-- Vertex style --> obj146.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj146.userData.edgeindices = [1, 0]; <!-- Edge style --> obj146.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj146); scene.add(obj146); var obj147 = new THREE.Object3D(); obj147.name = "unnamed__40"; obj147.userData.explodable = 1; obj147.userData.points = []; obj147.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj147.userData.points.push(new PMPoint(0.5, 6, -0.5)); obj147.userData.pointradii = 0.05775; <!-- Vertex style --> obj147.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj147.userData.edgeindices = [1, 0]; <!-- Edge style --> obj147.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj147); scene.add(obj147); var obj148 = new THREE.Object3D(); obj148.name = "unnamed__41"; obj148.userData.explodable = 1; obj148.userData.points = []; obj148.userData.points.push(new PMPoint(0.5, 0.5, -0.5)); obj148.userData.points.push(new PMPoint(6, 0.5, -0.5)); obj148.userData.pointradii = 0.05775; <!-- Vertex style --> obj148.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj148.userData.edgeindices = [1, 0]; <!-- Edge style --> obj148.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj148); scene.add(obj148); var obj149 = new THREE.Object3D(); obj149.name = "unnamed__42"; obj149.userData.explodable = 1; obj149.userData.points = []; obj149.userData.points.push(new PMPoint(-0.5, 0, 0)); obj149.userData.points.push(new PMPoint(0.5, 1, 1)); obj149.userData.pointradii = 0.05775; <!-- Vertex style --> obj149.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj149.userData.edgeindices = [1, 0]; <!-- Edge style --> obj149.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj149); scene.add(obj149); var obj150 = new THREE.Object3D(); obj150.name = "unnamed__43"; obj150.userData.explodable = 1; obj150.userData.points = []; obj150.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj150.userData.points.push(new PMPoint(0.5, 1, 1)); obj150.userData.pointradii = 0.05775; <!-- Vertex style --> obj150.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj150.userData.edgeindices = [1, 0]; <!-- Edge style --> obj150.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj150); scene.add(obj150); var obj151 = new THREE.Object3D(); obj151.name = "unnamed__44"; obj151.userData.explodable = 1; obj151.userData.points = []; obj151.userData.points.push(new PMPoint(0.5, 1, 1)); obj151.userData.points.push(new PMPoint(0.5, 6, 1)); obj151.userData.pointradii = 0.05775; <!-- Vertex style --> obj151.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj151.userData.edgeindices = [1, 0]; <!-- Edge style --> obj151.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj151); scene.add(obj151); var obj152 = new THREE.Object3D(); obj152.name = "unnamed__45"; obj152.userData.explodable = 1; obj152.userData.points = []; obj152.userData.points.push(new PMPoint(1, 0.75, 1)); obj152.userData.points.push(new PMPoint(0, -0.25, 0)); obj152.userData.pointradii = 0.05775; <!-- Vertex style --> obj152.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj152.userData.edgeindices = [1, 0]; <!-- Edge style --> obj152.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj152); scene.add(obj152); var obj153 = new THREE.Object3D(); obj153.name = "unnamed__46"; obj153.userData.explodable = 1; obj153.userData.points = []; obj153.userData.points.push(new PMPoint(-0.5, -0.25, 0)); obj153.userData.points.push(new PMPoint(0, -0.25, 0)); obj153.userData.pointradii = 0.05775; <!-- Vertex style --> obj153.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj153.userData.edgeindices = [1, 0]; <!-- Edge style --> obj153.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj153); scene.add(obj153); var obj154 = new THREE.Object3D(); obj154.name = "unnamed__47"; obj154.userData.explodable = 1; obj154.userData.points = []; obj154.userData.points.push(new PMPoint(0, -0.5, -0.25)); obj154.userData.points.push(new PMPoint(0, -0.25, 0)); obj154.userData.pointradii = 0.05775; <!-- Vertex style --> obj154.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj154.userData.edgeindices = [1, 0]; <!-- Edge style --> obj154.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj154); scene.add(obj154); var obj155 = new THREE.Object3D(); obj155.name = "unnamed__48"; obj155.userData.explodable = 1; obj155.userData.points = []; obj155.userData.points.push(new PMPoint(0.75, 1, 1.25)); obj155.userData.points.push(new PMPoint(1, 1, 1.25)); obj155.userData.pointradii = 0.05775; <!-- Vertex style --> obj155.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj155.userData.edgeindices = [1, 0]; <!-- Edge style --> obj155.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj155); scene.add(obj155); var obj156 = new THREE.Object3D(); obj156.name = "unnamed__49"; obj156.userData.explodable = 1; obj156.userData.points = []; obj156.userData.points.push(new PMPoint(1, 0.75, 1)); obj156.userData.points.push(new PMPoint(1, 1, 1.25)); obj156.userData.pointradii = 0.05775; <!-- Vertex style --> obj156.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj156.userData.edgeindices = [1, 0]; <!-- Edge style --> obj156.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj156); scene.add(obj156); var obj157 = new THREE.Object3D(); obj157.name = "unnamed__50"; obj157.userData.explodable = 1; obj157.userData.points = []; obj157.userData.points.push(new PMPoint(1, 0.75, 1)); obj157.userData.points.push(new PMPoint(6, 0.75, 1)); obj157.userData.pointradii = 0.05775; <!-- Vertex style --> obj157.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj157.userData.edgeindices = [1, 0]; <!-- Edge style --> obj157.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj157); scene.add(obj157); var obj158 = new THREE.Object3D(); obj158.name = "unnamed__51"; obj158.userData.explodable = 1; obj158.userData.points = []; obj158.userData.points.push(new PMPoint(2, 2, 2.25)); obj158.userData.points.push(new PMPoint(1, 1, 1.25)); obj158.userData.pointradii = 0.05775; <!-- Vertex style --> obj158.userData.pointmaterial = new THREE.MeshBasicMaterial( { color: 0xFF0000, side: THREE.DoubleSide, transparent: false } ); obj158.userData.edgeindices = [1, 0]; <!-- Edge style --> obj158.userData.edgematerial = new THREE.LineBasicMaterial( { color: 0x000000, linewidth: 7.85714285714286, transparent: false } ); init_object(obj158); scene.add(obj158); // COMMON_CODE_BLOCK_BEGIN function textSpriteMaterial(message, parameters) { if ( parameters === undefined ) parameters = {}; var fontface = "Helvetica"; var fontsize = parameters.hasOwnProperty("fontsize") ? parameters["fontsize"] : 15; fontsize = fontsize*10; var lines = message.split('\\n'); var size = 512; for(var i = 0; i<lines.length; i++){ var tmp = lines[i].length; while(tmp*fontsize > size){ fontsize--; } } var canvas = document.createElement('canvas'); canvas.width = size; canvas.height = size; var context = canvas.getContext('2d'); context.fillStyle = "rgba(255, 255, 255, 0)"; context.fill(); context.font = fontsize + "px " + fontface; // text color context.fillStyle = "rgba(0, 0, 0, 1.0)"; for(var i = 0; i<lines.length; i++){ context.fillText(lines[i], size/2, size/2+i*fontsize); } // canvas contents will be used for a texture var texture = new THREE.Texture(canvas); texture.needsUpdate = true; var spriteMaterial = new THREE.SpriteMaterial({map: texture, depthTest: true, depthWrite: false, polygonOffset: true, polygonOffsetFactor: -1, polygonOffsetUnits: 1 }); return spriteMaterial; } // ---------------------- INITIALIZING OBJECTS-------------------------------------- // --------------------------------------------------------------------------------- function init_object(obj) { if (obj.userData.hasOwnProperty("pointmaterial")) { init_points(obj); modelContains.points = true; } if (obj.userData.hasOwnProperty("pointlabels")) { init_pointlabels(obj); modelContains.pointlabels = true; } if (obj.userData.hasOwnProperty("edgematerial")) { init_lines(obj); modelContains.lines = true; } if (obj.userData.hasOwnProperty("edgelabels")) { init_edgelabels(obj); modelContains.edgelabels = true; } if (obj.userData.hasOwnProperty("arrowstyle")) { init_arrowheads(obj); modelContains.arrowheads = true; } if (obj.userData.hasOwnProperty("facetmaterial")) { init_faces(obj); modelContains.faces = true; } } function init_points(obj) { var pointgroup = new THREE.Group(); pointgroup.name = "points"; var points = obj.userData.points; var radii = obj.userData.pointradii; var materials = obj.userData.pointmaterial; var geometry,material; if (!Array.isArray(radii)) { geometry = new THREE.SphereBufferGeometry(radii); } if (!Array.isArray(materials)) { material = materials; } for (var i=0; i<points.length; i++) { var point = points[i]; if (Array.isArray(radii)) { if (radii[i] == 0) { continue; } geometry = new THREE.SphereBufferGeometry(radii[i]); } if (Array.isArray(materials)) { material = materials[i]; } var sphere = new THREE.Mesh(geometry, material); point.addSphere(sphere); pointgroup.add(sphere); } obj.add(pointgroup); } function init_pointlabels(obj) { var points = obj.userData.points; var labels = obj.userData.pointlabels; var pointlabels = new THREE.Group(); pointlabels.name = "pointlabels"; if (Array.isArray(labels)) { for (var i=0; i<points.length; i++) { var point = points[i]; var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<points.length; i++) { var point = points[i]; var sprite = new THREE.Sprite(spriteMaterial); point.addLabel(sprite); pointlabels.add(sprite); } } obj.add(pointlabels); } function init_lines(obj) { var edgeindices = obj.userData.edgeindices; var points = obj.userData.points; var materials = obj.userData.edgematerial; var geometry = new THREE.BufferGeometry(); var bufarr = new Float32Array( obj.userData.edgeindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute( bufarr, 3 ); var geometry = new THREE.BufferGeometry(); geometry.setAttribute('position', bufattr); if (Array.isArray(materials)) { for (var i=0; i<materials.length; i++) { geometry.addGroup(2*i,2,i); } } var lines = new THREE.LineSegments(geometry, materials); lines.name = "lines"; obj.add(lines); updateEdgesPosition(obj); } function init_edgelabels(obj) { var points = obj.userData.points; var edgeindices = obj.userData.edgeindices; var labels = obj.userData.edgelabels; var edgelabels = new THREE.Group(); edgelabels.name = "edgelabels"; if (Array.isArray(labels)) { for (var i=0; i<edgeindices.length/2; i++) { var spriteMaterial = textSpriteMaterial( labels[i] ); var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } else { var spriteMaterial = textSpriteMaterial( labels ); for (var i=0; i<edgeindices.length/2; i++) { var sprite = new THREE.Sprite(spriteMaterial); sprite.position.copy(new THREE.Vector3().addVectors(points[edgeindices[2*i]].vector,points[edgeindices[2*i+1]].vector).multiplyScalar(0.5)); edgelabels.add(sprite); } } obj.add(edgelabels); } function init_arrowheads(obj) { var arrowheads = new THREE.Group(); arrowheads.name = "arrowheads"; var arrowstyle = obj.userData.arrowstyle; var edgeindices = obj.userData.edgeindices; var edgematerials = obj.userData.edgematerial; var points = obj.userData.points; var material; if (!Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials.color} ); } for (var i=0; i<edgeindices.length; i=i+2) { var start = points[edgeindices[i]]; var end = points[edgeindices[i+1]]; var dist = start.vector.distanceTo( end.vector ) - start.radius() - end.radius(); if (dist <= 0) { continue; } var dir = new THREE.Vector3().subVectors(end.vector,start.vector); dir.normalize(); var axis = new THREE.Vector3().set(dir.z,0,-dir.x); axis.normalize(); var radians = Math.acos( dir.y ); var radius = dist/25; var height = dist/5; var geometry = new THREE.ConeBufferGeometry(radius,height); var position = new THREE.Vector3().addVectors(start.vector,dir.clone().multiplyScalar(start.radius()+dist-height/2)); if (Array.isArray(edgematerials)) { material = new THREE.MeshBasicMaterial( {color: edgematerials[i].color} ); } var cone = new THREE.Mesh( geometry, material ); cone.quaternion.setFromAxisAngle(axis,radians);; cone.position.copy(position);; arrowheads.add(cone); } obj.add(arrowheads); } function init_faces(obj) { var points = obj.userData.points; var facets = obj.userData.facets; obj.userData.triangleindices = []; for (var i=0; i<facets.length; i++) { facet = facets[i]; for (var t=0; t<facet.length-2; t++) { obj.userData.triangleindices.push(facet[0],facet[t+1],facet[t+2]); } } var bufarr = new Float32Array( obj.userData.triangleindices.length * 3 ); var bufattr = new THREE.Float32BufferAttribute(bufarr,3); var materials = obj.userData.facetmaterial; var geometry = new THREE.BufferGeometry(); var frontmaterials = []; var backmaterials = []; geometry.setAttribute('position',bufattr); if (Array.isArray(materials)) { var tricount = 0; var facet; for (var i=0; i<facets.length; i++) { facet = facets[i]; geometry.addGroup(tricount,(facet.length-2)*3,i); tricount += (facet.length-2)*3; } for (var j=0; j<materials.length; j++) { var fmat = materials[j].clone() fmat.side = THREE.FrontSide; frontmaterials.push(fmat); var bmat = materials[j].clone() bmat.side = THREE.BackSide; backmaterials.push(bmat); obj.userData.facetmaterial = frontmaterials.concat(backmaterials); } } else if (materials instanceof THREE.Material) { frontmaterials = materials.clone() frontmaterials.side = THREE.FrontSide; backmaterials = materials.clone() backmaterials.side = THREE.BackSide; obj.userData.facetmaterial = [frontmaterials, backmaterials]; } // duplicating the object with front and back should avoid transparency issues var backmesh = new THREE.Mesh(geometry, backmaterials); // meshname is used to show/hide objects backmesh.name = "backfaces"; obj.add(backmesh); var frontmesh = new THREE.Mesh(geometry, frontmaterials); frontmesh.name = "frontfaces"; obj.add(frontmesh); updateFacesPosition(obj); } // //INITIALIZING function updateFacesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.triangleindices; var faces = obj.getObjectByName("frontfaces"); var ba = faces.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } faces.geometry.attributes.position.needsUpdate = true; } function updateEdgesPosition(obj) { var points = obj.userData.points; var indices = obj.userData.edgeindices; var lines = obj.getObjectByName("lines"); var ba = lines.geometry.getAttribute("position"); for (var i=0; i<indices.length; i++) { ba.setXYZ(i, points[indices[i]].vector.x, points[indices[i]].vector.y ,points[indices[i]].vector.z); } lines.geometry.attributes.position.needsUpdate = true; } function onWindowResize() { renderer.setSize( three.clientWidth, three.clientHeight ); svgRenderer.setSize( three.clientWidth, three.clientHeight ); updateCamera(); } function updateCamera() { var width = three.clientWidth; var height = three.clientHeight; var aspect = width / height; if (camera.type == "OrthographicCamera") { camera.left = frustumSize * aspect / - 2; camera.right = frustumSize * aspect / 2; camera.top = frustumSize / 2; camera.bottom = - frustumSize / 2; } else if (camera.type == "PerspectiveCamera") { camera.aspect = aspect; } camera.updateProjectionMatrix(); } function changeCamera(event) { var selindex = event.currentTarget.selectedIndex; camera = cameras[selindex]; control = controls[selindex]; control.enabled = true; for (var i=0; i<controls.length; i++) { if (i!=selindex) { controls[i].enabled = false; } } updateCamera(); } var camtypenode = document.getElementById('cameraType_6'); camtypenode.onchange = changeCamera; camtypenode.dispatchEvent(new Event('change')); onWindowResize(); window.addEventListener('resize', onWindowResize); var xRotationEnabled = false; var yRotationEnabled = false; var zRotationEnabled = false; var rotationSpeedFactor = 1; var settingsShown = false; var labelsShown = true; var intervals = []; var timeouts = []; var explodingSpeed = 0.05; var explodeScale = 0.000001; var XMLS = new XMLSerializer(); var svgElement; var renderId; var render = function () { renderId = requestAnimationFrame(render); // comment in for automatic explosion // explode(updateFactor()); var phi = 0.02 * rotationSpeedFactor; if (xRotationEnabled) { scene.rotation.x += phi; } if (yRotationEnabled) { scene.rotation.y += phi; } if (zRotationEnabled) { scene.rotation.z += phi; } control.update(); renderer.render(scene, camera); }; if ( THREE.WEBGL.isWebGLAvailable() ) { render(); } else { var warning = WEBGL.getWebGLErrorMessage(); three.appendChild( warning ); } function changeTransparency() { var opacity = 1-Number(event.currentTarget.value); for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].opacity = opacity; } } else { child.userData.facetmaterial.opacity = opacity; } } } } function toggleDepthWrite(event) { depthwrite = event.currentTarget.checked; for (var i=0; i<scene.children.length; i++) { child = scene.children[i]; if ( child.userData.hasOwnProperty("facetmaterial") ) { if (Array.isArray(child.userData.facetmaterial)) { for (var j=0; j<child.userData.facetmaterial.length; j++) { child.userData.facetmaterial[j].depthWrite = depthwrite; } } else { child.userData.facetmaterial.depthWrite = depthWrite; } } } } function changeRotationX(event){ xRotationEnabled = event.currentTarget.checked; } function changeRotationY(event){ yRotationEnabled = event.currentTarget.checked; } function changeRotationZ(event){ zRotationEnabled = event.currentTarget.checked; } function changeRotationSpeedFactor(event){ rotationSpeedFactor = Number(event.currentTarget.value); } function resetScene(){ scene.rotation.set(0,0,0); camera.position.set(0,0,5); camera.up.set(0,1,0); } function showSettings(event){ document.getElementById('settings_6').style.visibility = 'visible'; document.getElementById('showSettingsButton_6').style.visibility = 'hidden'; document.getElementById('hideSettingsButton_6').style.visibility = 'visible'; settingsShown = true; } function hideSettings(event){ document.getElementById('settings_6').style.visibility = 'hidden'; document.getElementById('showSettingsButton_6').style.visibility = 'visible'; document.getElementById('hideSettingsButton_6').style.visibility = 'hidden'; settingsShown = false; } var pos = 150* Math.PI; function updateFactor() { pos++; return Math.sin(.01*pos)+1; } // ------------------------ FOLDING ------------------------------------------------ // --------------------------------------------------------------------------------- // rotate point p around axis defined by points p1 and p2 by given angle function rotate(p, p1, p2, angle ){ angle = -angle; var x = p.x, y = p.y, z = p.z, a = p1.x, b = p1.y, c = p1.z, u = p2.x-p1.x, v = p2.y-p1.y, w = p2.z-p1.z; var result = []; var L = u*u + v*v + w*w; var sqrt = Math.sqrt; var cos = Math.cos; var sin = Math.sin; result[0] = ((a*(v*v+w*w)-u*(b*v+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*x*cos(angle)+sqrt(L)*(-c*v+b*w-w*y+v*z)*sin(angle))/L; result[1] = ((b*(u*u+w*w)-v*(a*u+c*w-u*x-v*y-w*z))*(1-cos(angle))+L*y*cos(angle)+sqrt(L)*(c*u-a*w+w*x-u*z)*sin(angle))/L; result[2] = ((c*(u*u+v*v)-w*(a*u+b*v-u*x-v*y-w*z))*(1-cos(angle))+L*z*cos(angle)+sqrt(L)*(-b*u+a*v-v*x+u*y)*sin(angle))/L; return result; } var fold = function(event){ var obj = foldables[Number(event.currentTarget.name)]; var foldvalue = Number(event.currentTarget.value); var scale = foldvalue - obj.userData.oldscale; for (var j=0; j<obj.userData.axes.length; j++) { rotateVertices(obj, j, scale); } update(obj); obj.userData.oldscale += scale; lookAtBarycenter(obj); } function lookAtBarycenter(obj){ control.target = barycenter(obj); } function barycenter(obj) { var center = new THREE.Vector3(0,0,0); var points = obj.userData.points; for (var i=0; i<points.length; i++){ center.add(points[i].vector); } center.divideScalar(points.length); return center; } function rotateVertices(obj, edge, scale) { var axes = obj.userData.axes; var subtrees = obj.userData.subtrees; var points = obj.userData.points; var angles = obj.userData.angles; if (edge < axes.length){ for (var j=0; j<subtrees[edge].length; j++){ var rotP = rotate(points[subtrees[edge][j]].vector, points[axes[edge][0]].vector,points[axes[edge][1]].vector, scale * (Math.PI - angles[edge])); points[subtrees[edge][j]].set(rotP[0],rotP[1],rotP[2]); } } } function update(obj) { updateFacesPosition(obj); updateEdgesPosition(obj); } if (foldables.length) { var settings = document.getElementById('settings_6'); var foldDiv = document.createElement('div'); foldDiv.id = 'fold_6'; var title = document.createElement('strong'); title.innerHTML = 'Fold'; foldDiv.appendChild(title); foldDiv.className = 'group'; for (var i=0; i<foldables.length; i++) { var range = document.createElement('input'); range.type = 'range'; range.min = 0; range.max = 1; range.value = 0; range.step = 0.001; range.name = String(i); range.oninput = fold; foldDiv.appendChild(range); } lookAtBarycenter(foldables[0]); settings.insertBefore(foldDiv,settings.childNodes[0]); } // ---------------------- EXPLOSION ------------------------------------------------ // --------------------------------------------------------------------------------- if (explodableModel) { for (var i=0; i<scene.children.length; i++) { obj = scene.children[i]; if ( obj.userData.explodable ) { computeCentroid(obj); } } document.getElementById('explodeRange_6').oninput = triggerExplode; document.getElementById('explodeCheckbox_6').onchange = triggerAutomaticExplode; document.getElementById('explodingSpeedRange_6').oninput = setExplodingSpeed; explode(0.000001); } function computeCentroid(obj) { centroid = new THREE.Vector3(); obj.userData.points.forEach(function(pmpoint) { centroid.add(pmpoint.vector); }); centroid.divideScalar(obj.userData.points.length); obj.userData.centroid = centroid; } function explode(factor) { for (var i=0; i<scene.children.length; i++) { var obj = scene.children[i]; if (obj.userData.hasOwnProperty("centroid")) { var c = obj.userData.centroid; obj.position.set(c.x*factor, c.y*factor, c.z*factor); } } } function triggerExplode(event){ explodeScale = Number(event.currentTarget.value); explode(explodeScale); } function setExplodingSpeed(event){ explodingSpeed = Number(event.currentTarget.value); } function triggerAutomaticExplode(event){ if (event.currentTarget.checked){ startExploding(); } else { clearIntervals(); } } function startExploding(){ intervals.push(setInterval(explodingInterval, 25)); } function explodingInterval(){ explodeScale += explodingSpeed; if (explodeScale <= 6){ explode(explodeScale); } else{ explode(6); explodeScale = 6; clearIntervals(); timeouts.push(setTimeout(startUnexploding, 3000)); } document.getElementById('explodeRange_6').value = explodeScale; } function startUnexploding(){ intervals.push(setInterval(unexplodingInterval, 25)); } function unexplodingInterval(){ explodeScale -= explodingSpeed; if (explodeScale >= 0){ explode(explodeScale); } else { explode(0); explodeScale = 0; clearIntervals(); timeouts.push(setTimeout(startExploding, 3000)); } document.getElementById('explodeRange_6').value = explodeScale; } function clearIntervals(){ intervals.forEach(function(interval){ clearInterval(interval); }); intervals = []; timeouts.forEach(function(timeout){ clearTimeout(timeout); }); timeouts = []; } // ---------------------- DISPLAY -------------------------------------------------- // --------------------------------------------------------------------------------- const objectTypeInnerHTMLs = { points: "Points", pointlabels: "Point labels", lines: "Edges", edgelabels: "Edge labels", faces: "Faces", arrowheads: "Arrow heads" }; const objectTypeVisible = {}; Object.assign(objectTypeVisible,modelContains); const sortedObjectTypeKeys = Object.keys(objectTypeInnerHTMLs).sort(); const shownObjectTypesList = document.getElementById('shownObjectTypesList_6'); function setVisibility(bool,objname) { for (var i=0; i<scene.children.length; i++){ var obj = scene.children[i].getObjectByName(objname); if (obj) { obj.visible = bool; } } } function toggleObjectTypeVisibility(event){ var name = event.currentTarget.name; var checked = event.currentTarget.checked; objectTypeVisible[name] = checked; if (name == "faces") { setVisibility(checked,"frontfaces"); setVisibility(checked,"backfaces"); } else { setVisibility(checked,name); } } for (var i=0; i<sortedObjectTypeKeys.length; i++){ var key = sortedObjectTypeKeys[i]; if (modelContains[key]) { var objTypeNode = document.createElement('span'); objTypeNode.innerHTML = objectTypeInnerHTMLs[key] + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = key; checkbox.onchange = toggleObjectTypeVisibility; shownObjectTypesList.appendChild(checkbox); shownObjectTypesList.appendChild(objTypeNode); } } // ------------------------------------------------------ function toggleObjectVisibility(event){ var nr = Number(event.currentTarget.name); scene.children[nr].visible = event.currentTarget.checked; } // append checkboxes for displaying or hiding objects var shownObjectsList = document.getElementById('shownObjectsList_6'); for (var i=0; i<scene.children.length; i++){ obj = scene.children[i]; var objNode = document.createElement('span'); objNode.innerHTML = obj.name + '<br>'; var checkbox = document.createElement('input'); checkbox.type = 'checkbox'; checkbox.checked = true; checkbox.name = String(i); checkbox.onchange = toggleObjectVisibility; shownObjectsList.appendChild(checkbox); shownObjectsList.appendChild(objNode); } // ---------------------- SVG ------------------------------------------------------ // --------------------------------------------------------------------------------- function takeSvgScreenshot() { if (objectTypeVisible["pointlabels"]) { setVisibility(false,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(false,"edgelabels"); } svgRenderer.render(scene,camera); svgElement = XMLS.serializeToString(svgRenderer.domElement); if (objectTypeVisible["pointlabels"]) { setVisibility(true,"pointlabels"); } if (objectTypeVisible["edgelabels"]) { setVisibility(true,"edgelabels"); } if (document.getElementById('tab_6').checked){ //show in new tab var myWindow = window.open("",""); myWindow.document.body.innerHTML = svgElement; } else{ // download svg file download("screenshot.svg", svgElement); } } function download(filename, text) { var element = document.createElement('a'); element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); element.setAttribute('download', filename); element.style.display = 'none'; document.body.appendChild(element); element.click(); document.body.removeChild(element); } document.getElementById('transparencyRange_6').oninput = changeTransparency; document.getElementById('depthWriteCheckbox_6').onchange = toggleDepthWrite; document.getElementById('changeRotationX_6').onchange = changeRotationX; document.getElementById('changeRotationY_6').onchange = changeRotationY; document.getElementById('changeRotationZ_6').onchange = changeRotationZ; document.getElementById('resetButton_6').onclick = resetScene; document.getElementById('rotationSpeedRange_6').oninput = changeRotationSpeedFactor; document.getElementById('takeScreenshot_6').onclick = takeSvgScreenshot; document.getElementById('showSettingsButton_6').onclick = showSettings; document.getElementById('hideSettingsButton_6').onclick = hideSettings; // ------------------ SHORTCUTS -------------------------------------------- // ------------------------------------------------------------------------- /** * http://www.openjs.com/scripts/events/keyboard_shortcuts/ * Version : 2.01.B * By Binny V A * License : BSD */ shortcut = { 'all_shortcuts':{},//All the shortcuts are stored in this array 'add': function(shortcut_combination,callback,opt) { //Provide a set of default options var default_options = { 'type':'keydown', 'propagate':false, 'disable_in_input':false, 'target':document, 'keycode':false } if(!opt) opt = default_options; else { for(var dfo in default_options) { if(typeof opt[dfo] == 'undefined') opt[dfo] = default_options[dfo]; } } var ele = opt.target; if(typeof opt.target == 'string') ele = document.getElementById(opt.target); var ths = this; shortcut_combination = shortcut_combination.toLowerCase(); //The function to be called at keypress var func = function(e) { e = e || window.event; if(opt['disable_in_input']) { //Don't enable shortcut keys in Input, Textarea fields var element; if(e.target) element=e.target; else if(e.srcElement) element=e.srcElement; if(element.nodeType==3) element=element.parentNode; if(element.tagName == 'INPUT' || element.tagName == 'TEXTAREA') return; } //Find Which key is pressed if (e.keyCode) code = e.keyCode; else if (e.which) code = e.which; var character = String.fromCharCode(code).toLowerCase(); if(code == 188) character=","; //If the user presses , when the type is onkeydown if(code == 190) character="."; //If the user presses , when the type is onkeydown var keys = shortcut_combination.split("+"); //Key Pressed - counts the number of valid keypresses - if it is same as the number of keys, the shortcut function is invoked var kp = 0; //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken var shift_nums = { "`":"~", "1":"!", "2":"@", "3":"#", "4":"$", "5":"%", "6":"^", "7":"&", "8":"*", "9":"(", "0":")", "-":"_", "=":"+", ";":":", "'":"\"", ",":"<", ".":">", "/":"?", "\\":"|" } //Special Keys - and their codes var special_keys = { 'esc':27, 'escape':27, 'tab':9, 'space':32, 'return':13, 'enter':13, 'backspace':8, 'scrolllock':145, 'scroll_lock':145, 'scroll':145, 'capslock':20, 'caps_lock':20, 'caps':20, 'numlock':144, 'num_lock':144, 'num':144, 'pause':19, 'break':19, 'insert':45, 'home':36, 'delete':46, 'end':35, 'pageup':33, 'page_up':33, 'pu':33, 'pagedown':34, 'page_down':34, 'pd':34, 'left':37, 'up':38, 'right':39, 'down':40, 'f1':112, 'f2':113, 'f3':114, 'f4':115, 'f5':116, 'f6':117, 'f7':118, 'f8':119, 'f9':120, 'f10':121, 'f11':122, 'f12':123 } var modifiers = { shift: { wanted:false, pressed:false}, ctrl : { wanted:false, pressed:false}, alt : { wanted:false, pressed:false}, meta : { wanted:false, pressed:false} //Meta is Mac specific }; if(e.ctrlKey) modifiers.ctrl.pressed = true; if(e.shiftKey) modifiers.shift.pressed = true; if(e.altKey) modifiers.alt.pressed = true; if(e.metaKey) modifiers.meta.pressed = true; for(var i=0; k=keys[i],i<keys.length; i++) { //Modifiers if(k == 'ctrl' || k == 'control') { kp++; modifiers.ctrl.wanted = true; } else if(k == 'shift') { kp++; modifiers.shift.wanted = true; } else if(k == 'alt') { kp++; modifiers.alt.wanted = true; } else if(k == 'meta') { kp++; modifiers.meta.wanted = true; } else if(k.length > 1) { //If it is a special key if(special_keys[k] == code) kp++; } else if(opt['keycode']) { if(opt['keycode'] == code) kp++; } else { //The special keys did not match if(character == k) kp++; else { if(shift_nums[character] && e.shiftKey) { //Stupid Shift key bug created by using lowercase character = shift_nums[character]; if(character == k) kp++; } } } } if(kp == keys.length && modifiers.ctrl.pressed == modifiers.ctrl.wanted && modifiers.shift.pressed == modifiers.shift.wanted && modifiers.alt.pressed == modifiers.alt.wanted && modifiers.meta.pressed == modifiers.meta.wanted) { callback(e); if(!opt['propagate']) { //Stop the event //e.cancelBubble is supported by IE - this will kill the bubbling process. e.cancelBubble = true; e.returnValue = false; //e.stopPropagation works in Firefox. if (e.stopPropagation) { e.stopPropagation(); e.preventDefault(); } return false; } } } this.all_shortcuts[shortcut_combination] = { 'callback':func, 'target':ele, 'event': opt['type'] }; //Attach the function with the event if(ele.addEventListener) ele.addEventListener(opt['type'], func, false); else if(ele.attachEvent) ele.attachEvent('on'+opt['type'], func); else ele['on'+opt['type']] = func; }, //Remove the shortcut - just specify the shortcut and I will remove the binding 'remove':function(shortcut_combination) { shortcut_combination = shortcut_combination.toLowerCase(); var binding = this.all_shortcuts[shortcut_combination]; delete(this.all_shortcuts[shortcut_combination]) if(!binding) return; var type = binding['event']; var ele = binding['target']; var callback = binding['callback']; if(ele.detachEvent) ele.detachEvent('on'+type, callback); else if(ele.removeEventListener) ele.removeEventListener(type, callback, false); else ele['on'+type] = false; } } shortcut.add("Alt+Left",function() { var event = new Event('click'); if (settingsShown){ document.getElementById('hideSettingsButton_6').dispatchEvent(event); } else { document.getElementById('showSettingsButton_6').dispatchEvent(event); } }); // COMMON_CODE_BLOCK_END });}); </script> </body> </html> </HTML> ==== Step A: applying the bounding cube to curves in Blender ==== - Import the x3d file of the curve and join all spheres and indexed faceset objects. - Import the x3d file of the bounding cube. - Add a boolean intersect modifier to the lines object {{:tutorials:release:4.8:3d_printing_with_x3d:boolean_intersect_modifier.jpeg|boolean_intersect_modifier.jpeg}} - Choose the cube object to intersect with. {{:tutorials:release:4.8:3d_printing_with_x3d:boolean_intersect_modifier_applied.jpeg|boolean_intersect_modifier_applied.jpeg}} - After clicking on apply you can delete the bounding cube and import the (solidified) cubic. {{:tutorials:release:4.8:3d_printing_with_x3d:sextic_in_cubic.jpeg|sextic_in_cubic.jpeg}} ===== Tropical lines on tropical cubic surfaces ===== Polymake is capable of computing all tropical lines on a given tropical cubic surface. Here is how you make a model out of it <code perl> > $mCubic2 = [ [3,0,0,0], [0,3,0,0], [0,0,3,0], [0,0,0,3], > [1,1,1,0], [1,1,0,1], [1,0,1,1], [0,1,1,1], > [2,1,0,0], [2,0,1,0], [2,0,0,1], > [1,2,0,0], [1,0,2,0], [1,0,0,2], > [0,2,1,0], [0,2,0,1], [0,1,2,0], > [0,1,0,2], [0,0,2,1], [0,0,1,2]]; > $cCubic2 = [3,3,3,3,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1]; > $TCubic2 = new Hypersurface<Min>(MONOMIALS=>$mCubic2, COEFFICIENTS=>$cCubic2); > $linesInCubic = lines_in_cubic($TCubic->POLYNOMIAL); > @lines = map { $_->representative } @{$linesInCubic->all_families}; </code> In this model we are going to use the bounding cube intersection frame (as in a previous section) to round the edges of the surface. We will also keep the spheres as caps for our lines, hence the model will be one lines diameter bigger than the actual bounding box. <code perl> > $bFacets = polytope::bounding_box_facets($TCubic2->affine_chart->VERTICES,surplus_k=>0.4, make_cube=>1); > $diam = $bFacets->[0]->[0] + $bFacets->[1]->[0]; > $total_mm = 100; #planned size of the model > $surface_mm = 2; > $frame_mm = $surface_mm; > $lines_mm = 3; > > $surface_abs = ($surface_mm*$diam/$total_mm)/(1-$lines_mm/$total_mm); > $frame_diam = ($frame_mm*$diam/$total_mm)/(1-$lines_mm/$total_mm); > $lines_diam = ($lines_mm*$diam/$total_mm)/(1-$lines_mm/$total_mm); > $surface_opts = {VertexStyle=>'hidden',EdgeStyle=>'hidden'}; > $frame_opts = x3dprint_curve_opts($frame_diam,$frame_diam); > $lines_opts = x3dprint_curve_opts($lines_diam,$lines_diam); > > $bPolytope = new polytope::Polytope(FACETS=>$bFacets); > $bComplex = new fan::PolyhedralComplex(fan::check_fan_objects(($bPolytope))); </code> Please note that, in contrast to the examples before, the cubic is bound before solidifying. Otherwise the frame won't fit correctly <code perl> > $TCubic2Bounded = pcom_common_ref($TCubic2->affine_chart,$bComplex); > $solidifiedTCubic2Cells = solidify_2d_pcom($TCubic2Bounded,$surface_abs); > @solidifiedTCubic2CellsVis = map { $_->VISUAL($surface_opts) } @$solidifiedTCubic2Cells; > > # the frame > $c2frame = pcom_common_ref($TCubic2->affine_chart, $bPolytope->BOUNDED_COMPLEX); > $c2frameVis = $c2frame->VISUAL($frame_opts); > > # the lines > $bPolytope = new polytope::Polytope(FACETS=>$bFacets); > @linesBounded = map { pcom_common_ref($_->affine_chart,$bComplex) } @lines; > @linesVis = map { $_->VISUAL($lines_opts) } @linesBounded; > x3d(compose(@solidifiedTCubic2CellsVis,$c2frameVis,@linesVis),File=>$x3d_dir."LinesInTCubic2SolidifiedRadiused.x3d"); </code> Which looks like this in blender {{:tutorials:release:4.8:3d_printing_with_x3d:lines_in_cubic_and_cubic.jpeg|lines_in_cubic_and_cubic.jpeg}} user_guide/tutorials/release/4.8/3d_printing_with_x3d.txt Last modified: 2022/12/19 15:11by 127.0.0.1