Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
4408940d
Commit
4408940d
authored
May 04, 2017
by
amandaghassaei
Browse files
axial strain
parent
ebeb7c77
Changes
3
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
4408940d
...
...
@@ -490,8 +490,8 @@
Face Normals Material
</label>
<label
class=
"radio"
>
<input
name=
"colorMode"
value=
"
error
"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Node Error
Material
<input
name=
"colorMode"
value=
"
axialStrain
"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Axial Strain
Material
</label>
</div>
</div><br/>
...
...
@@ -618,10 +618,13 @@
origami pattern are being violated. The error at each node is evaluated by averaging the
percent deviation of all its distance constraints with adjacent nodes. This error is
reported as a percent of the total length of the distance constraint to remove scaling effects.
<br/><br/>
This measurement is equivalent to
<a
href=
"https://en.wikipedia.org/wiki/Deformation_(mechanics)#Engineering_strain"
target=
"_blank"
>
Cauchy strain or engineering strain
</a>
of the axial constraints on this system.
Increasing the "Axial Stiffness" of the simulation will tighten these constraints and
lower the error in the simulation.
<br/>
<br/>
To visualize the error of each node graphically, select "
Node Error
Material" under "Mesh Material"
To visualize the error of each node graphically, select "
Axial Strain
Material" under "Mesh Material"
in the left menu.
</p>
</div>
...
...
js/dynamic/dynamicSolver.js
View file @
4408940d
...
...
@@ -166,7 +166,7 @@ function initDynamicSolver(globals){
var
positions
=
globals
.
model
.
getPositionsArray
();
var
globalError
=
0
;
var
colors
;
if
(
globals
.
colorMode
==
"
error
"
){
if
(
globals
.
colorMode
==
"
axialStrain
"
){
colors
=
globals
.
model
.
getColorsArray
();
}
for
(
var
i
=
0
;
i
<
nodes
.
length
;
i
++
)
{
...
...
js/model.js
View file @
4408940d
...
...
@@ -22,7 +22,7 @@ function initModel(globals){
function
setMeshMaterial
()
{
if
(
globals
.
colorMode
==
"
normal
"
)
{
material
=
new
THREE
.
MeshNormalMaterial
({
side
:
THREE
.
DoubleSide
});
}
else
if
(
globals
.
colorMode
==
"
error
"
){
}
else
if
(
globals
.
colorMode
==
"
axialStrain
"
){
material
=
new
THREE
.
MeshBasicMaterial
({
vertexColors
:
THREE
.
VertexColors
,
side
:
THREE
.
DoubleSide
});
}
else
{
//todo can't do this
...
...
@@ -133,7 +133,7 @@ function initModel(globals){
console
.
log
(
"
static
"
);
}
geometry
.
attributes
.
position
.
needsUpdate
=
true
;
if
(
globals
.
colorMode
==
"
error
"
)
geometry
.
attributes
.
color
.
needsUpdate
=
true
;
if
(
globals
.
colorMode
==
"
axialStrain
"
)
geometry
.
attributes
.
color
.
needsUpdate
=
true
;
geometry
.
computeVertexNormals
();
// geometry.computeFlatVertexNormals();
});
...
...
Write
Preview
Markdown
is supported
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