Commit 46cacdba authored by amandaghassaei's avatar amandaghassaei

benchmarking dynamics

parent 91a981bc
......@@ -376,7 +376,7 @@
}
vec3 velocity = force*u_dt/mass[0] + lastVelocity;
gl_FragColor = vec4(velocity,nodeError);
gl_FragColor = vec4(velocity,length(velocity)*length(velocity));
}
</script>
......
......@@ -443,7 +443,7 @@ function initControls(globals){
globals.creaseMaterialHasChanged = true;
});
setSliderInput("#percentDamping", globals.percentDamping, 0.1, 1, 0.01, function(val){
setSliderInput("#percentDamping", globals.percentDamping, 0, 1, 0.01, function(val){
globals.percentDamping = val;
globals.materialHasChanged = true;
});
......
......@@ -183,6 +183,8 @@ function initDynamicSolver(globals){
return avgPosition;
}
window.ke = [];
function render(){
// var vectorLength = 2;
......@@ -242,6 +244,7 @@ function initDynamicSolver(globals){
colors[3*i+2] = color.b;
}
}
window.ke.push(globalError);
$errorOutput.html((globalError/nodes.length).toFixed(7) + " %");
} else {
console.log("shouldn't be here");
......
......@@ -81,7 +81,7 @@ function initGlobals(){
userInteractionEnabled: false,
vrEnabled: false,
numSteps: 100,
numSteps: 10,
rotateModel: null,
rotationSpeed: 0.01,
......
Markdown is supported
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