diff --git a/js/fea/dmaCell.js b/js/fea/dmaCell.js index 219bb256b74fbbc1315d56b330060f12f344f81d..f0cb89efdcc64d1fe1898b215b5b2b2c1d162cd9 100644 --- a/js/fea/dmaCell.js +++ b/js/fea/dmaCell.js @@ -7,7 +7,7 @@ (function () { - var octHeight = 3*30/8*Math.sqrt(5);//this isn't quite right + var octHeight = 2*30/Math.sqrt(6); var cellGeometry1 = new THREE.OctahedronGeometry(30/Math.sqrt(2)); cellGeometry1.applyMatrix(new THREE.Matrix4().makeRotationZ(-3*Math.PI/12)); @@ -37,7 +37,7 @@ DMACell.prototype._calcPositionForScale = function(scale){ var position = {}; var indices = this.indices; - var octHeight = 3*scale/8*Math.sqrt(5);//this isn't quite right + var octHeight = 2*scale/Math.sqrt(6); var triHeight = scale/2*Math.sqrt(3); position.x = indices.x*scale; position.y = indices.y*triHeight; diff --git a/js/models/lattice.js b/js/models/lattice.js index 164484c3d7a80f7894b59f10f5ac8705ddc136f7..77c6462c17cb73051c0fb2ba5986bd0f27fab114 100644 --- a/js/models/lattice.js +++ b/js/models/lattice.js @@ -32,7 +32,7 @@ Lattice = Backbone.Model.extend({ //calc indices in cell matrix var scale = this.get("scale"); - var octHeight = 3*scale/8*Math.sqrt(5);//this isn't quite right + var octHeight = 2*scale/Math.sqrt(6); var triHeight = scale/2*Math.sqrt(3); var position = {}; position.x = Math.round(absPosition.x/scale);