Skip to content
GitLab
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
438e1bc8
Commit
438e1bc8
authored
Jun 01, 2017
by
amandaghassaei
Browse files
cleaning up
parent
aed802b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
438e1bc8
...
...
@@ -307,17 +307,23 @@
float
triangleStiffness
=
0.1
;
anglesDiff
*=
triangleStiffness
;
if
(
faceIndex
==
0
){
//a
force
-=
anglesDiff
[
0
]
*
(
cross
(
normal
,
ac
)
/
lengthAC
-
cross
(
normal
,
ab
)
/
lengthAB
);
force
+=
anglesDiff
[
1
]
*
cross
(
normal
,
-
ab
)
/
lengthAB
;
force
-=
anglesDiff
[
2
]
*
cross
(
normal
,
-
ac
)
/
lengthAC
;
vec3
normalCrossAC
=
cross
(
normal
,
ac
)
/
lengthAC
;
vec3
normalCrossAB
=
cross
(
normal
,
ab
)
/
lengthAB
;
force
-=
anglesDiff
[
0
]
*
(
normalCrossAC
-
normalCrossAB
);
force
-=
anglesDiff
[
1
]
*
normalCrossAB
;
force
+=
anglesDiff
[
2
]
*
normalCrossAC
;
}
else
if
(
faceIndex
==
1
){
force
-=
anglesDiff
[
0
]
*
cross
(
normal
,
ab
)
/
lengthAB
;
force
-=
anglesDiff
[
1
]
*
(
cross
(
normal
,
-
ab
)
/
lengthAB
-
cross
(
normal
,
bc
)
/
lengthBC
);
force
+=
anglesDiff
[
2
]
*
cross
(
normal
,
-
bc
)
/
lengthBC
;
vec3
normalCrossAB
=
cross
(
normal
,
ab
)
/
lengthAB
;
vec3
normalCrossBC
=
cross
(
normal
,
bc
)
/
lengthBC
;
force
-=
anglesDiff
[
0
]
*
normalCrossAB
;
force
+=
anglesDiff
[
1
]
*
(
normalCrossAB
+
normalCrossBC
);
force
-=
anglesDiff
[
2
]
*
normalCrossBC
;
}
else
if
(
faceIndex
==
2
){
force
+=
anglesDiff
[
0
]
*
cross
(
normal
,
ac
)
/
lengthAC
;
force
-=
anglesDiff
[
1
]
*
cross
(
normal
,
bc
)
/
lengthBC
;
force
-=
anglesDiff
[
2
]
*
(
cross
(
normal
,
-
bc
)
/
lengthBC
-
cross
(
normal
,
-
ac
)
/
lengthAC
);
vec3
normalCrossAC
=
cross
(
normal
,
ac
)
/
lengthAC
;
vec3
normalCrossBC
=
cross
(
normal
,
bc
)
/
lengthBC
;
force
+=
anglesDiff
[
0
]
*
normalCrossAC
;
force
-=
anglesDiff
[
1
]
*
normalCrossBC
;
force
+=
anglesDiff
[
2
]
*
(
normalCrossBC
-
normalCrossAC
);
}
}
...
...
@@ -668,10 +674,10 @@
<span
class=
"label-slider"
>
Axial Strength :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
<input
value=
""
placeholder=
""
class=
"form-control"
type=
"text"
>
</div>
<div
class=
"sliderInput paddingBottom"
id=
"triStiffness"
>
<span
class=
"label-slider"
>
Triangle Strength :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
<input
value=
""
placeholder=
""
class=
"form-control"
type=
"text"
>
</div>
<!--
<div class="sliderInput paddingBottom" id="triStiffness">
-->
<!--
<span class="label-slider">Triangle Strength : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div>
-->
<!--
<input value="" placeholder="" class="form-control" type="text">
-->
<!--
</div>
-->
<div
class=
"sliderInput"
id=
"creaseStiffness"
>
<span
class=
"label-slider"
>
Fold Strength :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
<input
value=
""
placeholder=
""
class=
"form-control"
type=
"text"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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