Commit e0adec0b authored by amandaghassaei's avatar amandaghassaei
Browse files

debugging

parent f040ca36
...@@ -253,11 +253,8 @@ ...@@ -253,11 +253,8 @@
vec3 creaseVector = texture2D(u_creaseVectors, scaledFragCoord).xyz; vec3 creaseVector = texture2D(u_creaseVectors, scaledFragCoord).xyz;
float sign = dot(cross(normal1, normal2), creaseVector); float sign = dot(cross(normal1, normal2), creaseVector);
if (sign < 0.0) theta *= -1.0; if (sign < 0.0) theta *= -1.0;
if (lastTheta[1] < 0.0){//decreasing if (theta > 3.0 && lastTheta[0] < -3.0) theta -= 2.0*M_PI*(1.0+floor(lastTheta[0]/2.0*M_PI));
if (theta > 1.0 && lastTheta[0] < -1.0) theta -= 2.0*M_PI*(1.0+mod(lastTheta[0], 2.0*M_PI)); if (theta < -3.0 && lastTheta[0] > 3.0) theta += 2.0*M_PI*(1.0+floor(lastTheta[0]/2.0*M_PI));
} else {//increasing
if (theta < -1.0 && lastTheta[0] > 1.0) theta += 2.0*M_PI*(1.0+mod(lastTheta[0], 2.0*M_PI));
}
gl_FragColor = vec4(theta, theta-lastTheta[0], lastTheta[2], lastTheta[3]);//[theta, w, normal1Index, normal2Index] gl_FragColor = vec4(theta, theta-lastTheta[0], lastTheta[2], lastTheta[3]);//[theta, w, normal1Index, normal2Index]
} }
</script> </script>
...@@ -362,20 +359,20 @@ ...@@ -362,20 +359,20 @@
<div id="controls"> <div id="controls">
<div class="sliderInput" id="creasePercent"> <div class="sliderInput" id="creasePercent">
<span class="label-slider">Crease Percent : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div> <span class="label-slider">Crease Percent : </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 int" type="text"> <input value="" placeholder="" class="form-control" type="text">
</div> </div>
<br/><br/><br/> <br/><br/><br/>
<div class="sliderInput" id="axialStiffness"> <div class="sliderInput" id="axialStiffness">
<span class="label-slider">Axial Stiffness : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div> <span class="label-slider">Axial Stiffness : </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 int" type="text"> <input value="" placeholder="" class="form-control" type="text">
</div> </div>
<div class="sliderInput" id="creaseStiffness"> <div class="sliderInput" id="creaseStiffness">
<span class="label-slider">Crease Stiffness : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div> <span class="label-slider">Crease Stiffness : </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 int" type="text"> <input value="" placeholder="" class="form-control" type="text">
</div> </div>
<div class="sliderInput" id="panelStiffness"> <div class="sliderInput" id="panelStiffness">
<span class="label-slider">Panel Stiffness : </span><div class="flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"></div> <span class="label-slider">Panel Stiffness : </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 int" type="text"> <input value="" placeholder="" class="form-control" type="text">
</div> </div>
<div id="svgViewer"></div> <div id="svgViewer"></div>
<div class="extraSpace"></div> <div class="extraSpace"></div>
......
...@@ -46,7 +46,7 @@ function initModel(globals){ ...@@ -46,7 +46,7 @@ function initModel(globals){
} }
var _creases = []; var _creases = [];
for (var i=0;i<1;i++) { for (var i=0;i<1;i++) {//allCreaseParams.length
var creaseParams = allCreaseParams[i];//face1Ind, vertInd, face2Ind, ver2Ind, edgeInd, angle var creaseParams = allCreaseParams[i];//face1Ind, vertInd, face2Ind, ver2Ind, edgeInd, angle
_edges[creaseParams[4]].highlight(); _edges[creaseParams[4]].highlight();
_creases.push(new Crease(_edges[creaseParams[4]], creaseParams[0], creaseParams[2], creaseParams[5], 1, _nodes[creaseParams[1]], _nodes[creaseParams[3]], _creases.length)); _creases.push(new Crease(_edges[creaseParams[4]], creaseParams[0], creaseParams[2], creaseParams[5], 1, _nodes[creaseParams[1]], _nodes[creaseParams[3]], _creases.length));
......
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