Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
39ac1751
Commit
39ac1751
authored
Apr 29, 2017
by
amandaghassaei
Browse files
eod
parent
25742177
Changes
5
Hide whitespace changes
Inline
Side-by-side
js/globals.js
View file @
39ac1751
...
...
@@ -33,7 +33,7 @@ function initGlobals(){
density
:
1
,
//import pattern settings
vertTol
:
0.
0
1
//vertex merge tolerange
vertTol
:
0.1
//vertex merge tolerange
};
...
...
js/model.js
View file @
39ac1751
...
...
@@ -33,7 +33,7 @@ function initModel(globals){
var
creases
=
[];
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
));
creases
.
push
(
new
Crease
(
edges
[
4
],
2
,
1
,
-
(
Math
.
PI
-
0.001
)
,
1
,
nodes
[
4
],
nodes
[
0
],
1
));
var
_allNodeObject3Ds
=
[];
_
.
each
(
nodes
,
function
(
node
){
...
...
js/pattern.js
View file @
39ac1751
...
...
@@ -32,7 +32,7 @@ function initPattern(globals){
});
}
// loadSVG("assets/Tessellations/
miura-ori
.svg", function(svg){
// loadSVG("assets/Tessellations/
SimpleVertex
.svg", function(svg){
// var _$svg = $(svg);
//
// //format all lines
...
...
js/staticSolver.js
View file @
39ac1751
...
...
@@ -223,7 +223,7 @@ function initStaticSolver(){
var
i
=
indicesMapping
.
indexOf
(
crease
.
node1
.
getIndex
());
var
dist
=
crease
.
getLengthToNode1
();
// dist = 1.0;
C
[
j
+
numFreeEdges
][
3
*
i
]
=
-
normal1
.
x
/
dist
;
//todo not sure about sign
C
[
j
+
numFreeEdges
][
3
*
i
]
=
-
normal1
.
x
/
dist
;
C
[
j
+
numFreeEdges
][
3
*
i
+
1
]
=
-
normal1
.
y
/
dist
;
C
[
j
+
numFreeEdges
][
3
*
i
+
2
]
=
-
normal1
.
z
/
dist
;
rxnForceScale
=
crease
.
getK
()
*
diff
/
dist
;
...
...
js/threeView.js
View file @
39ac1751
...
...
@@ -43,7 +43,7 @@ function initThreeView(globals) {
//scene.fog = new THREE.FogExp2(0xf4f4f4, 1.7);
//renderer.setClearColor(scene.fog.color);
camera
.
zoom
=
7
;
camera
.
zoom
=
1
;
camera
.
updateProjectionMatrix
();
camera
.
position
.
x
=
4000
;
camera
.
position
.
y
=
4000
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment