Commit 25742177 authored by amandaghassaei's avatar amandaghassaei
Browse files

two creases working

parent 15f67df1
...@@ -12,6 +12,7 @@ function initModel(globals){ ...@@ -12,6 +12,7 @@ function initModel(globals){
nodes.push(new Node(new THREE.Vector3(0,0,10), nodes.length)); nodes.push(new Node(new THREE.Vector3(0,0,10), nodes.length));
nodes.push(new Node(new THREE.Vector3(10,0,0), nodes.length)); nodes.push(new Node(new THREE.Vector3(10,0,0), nodes.length));
nodes.push(new Node(new THREE.Vector3(0,0,-10), nodes.length)); nodes.push(new Node(new THREE.Vector3(0,0,-10), nodes.length));
nodes.push(new Node(new THREE.Vector3(10,0,-10), nodes.length));
nodes[0].setFixed(true); nodes[0].setFixed(true);
nodes[1].setFixed(true); nodes[1].setFixed(true);
nodes[2].setFixed(true); nodes[2].setFixed(true);
...@@ -22,13 +23,17 @@ function initModel(globals){ ...@@ -22,13 +23,17 @@ function initModel(globals){
edges.push(new Beam([nodes[2], nodes[0]])); edges.push(new Beam([nodes[2], nodes[0]]));
edges.push(new Beam([nodes[3], nodes[0]])); edges.push(new Beam([nodes[3], nodes[0]]));
edges.push(new Beam([nodes[3], nodes[2]])); edges.push(new Beam([nodes[3], nodes[2]]));
edges.push(new Beam([nodes[3], nodes[4]]));
edges.push(new Beam([nodes[2], nodes[4]]));
var faces = []; var faces = [];
faces.push(new THREE.Face3(0,1,2)); faces.push(new THREE.Face3(0,1,2));
faces.push(new THREE.Face3(0,2,3)); faces.push(new THREE.Face3(0,2,3));
faces.push(new THREE.Face3(4,3,2));
var creases = []; var creases = [];
creases.push(new Crease(edges[2], 0, 1, Math.PI/2, 1, nodes[1], nodes[3], 0)); creases.push(new Crease(edges[2], 0, 1, Math.PI-0.001, 1, nodes[1], nodes[3], 0));
creases.push(new Crease(edges[4], 2, 1, Math.PI-0.001, 1, nodes[4], nodes[0], 1));
var _allNodeObject3Ds = []; var _allNodeObject3Ds = [];
_.each(nodes, function(node){ _.each(nodes, function(node){
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment