Commit 7bbdd540 authored by amandaghassaei's avatar amandaghassaei

documentation

parent 0523a7d7
...@@ -340,4 +340,8 @@ input.form-control.bigInput{ ...@@ -340,4 +340,8 @@ input.form-control.bigInput{
#unitsDropdown{ #unitsDropdown{
height: 100px; height: 100px;
overflow: auto; overflow: auto;
}
.modal img{
width: 200px;
} }
\ No newline at end of file
...@@ -628,25 +628,35 @@ ...@@ -628,25 +628,35 @@
<b>Importing FOLD:</b><br/> <b>Importing FOLD:</b><br/>
<br/><br/> <br/><br/>
<b>Importing SVG:</b><br/> <b>Importing SVG:</b><br/>
supported line types: path objects, line objects (coming), rect objects (coming).<br/> <ul>
valley: red rgb(255, 0, 0), hex #ff0000<br/> <li>The SVG importer supports path objects and line objects (coming). Please convert polygons to paths before importing.</li>
mtn: blue rgb(0, 0, 255), hex #0000ff<br/> <li>Valley folds are red - <span style="color:red">rgb(255, 0, 0), hex #ff0000</span></li>
outline: black rgb(0,0,0) hex #000000<br/> <li>Mountain folds are blue - <span style="color:blue">rgb(0, 0, 255), hex #0000ff</span></li>
stroke and line style do not matter.<br/> <li>Outline edges are black - <span style="color:black">rgb(0, 0, 0), hex #000000</span></li>
target fold angle set by opacity: 1.0 = PI, 0.5 = PI/2, 0 = 0<br/> <img src="assets/examplepattern.jpg"/>
This tool should be able to automatically clean files of slightly misaligned vertices, stray vertices, <li>This tool will automatically triangulate regions in the pattern that form polygons with more than three sides.
duplicate lines (coming), and anchor points falling in the middle of an edge (coming), To control the triangulations draw lines in yellow - <span style="color:#999900">rgb(255, 255, 0), hex #ffff00</span></li>
but it is recommended to remove these errors yourself in order to avoid problems.<br/><br/> <img src="assets/patternwithtriangulations.jpg"/>
<b>For Adobe Illustrator users:</b><br/> <li>Stroke and line style do not matter.</li>
I use Illustrator to create SVGs (though any vector editing program should be fine), here are some tips to make patterns that will work.<br/> <li>The final fold angle of a mountain or valley fold is set by its opacity. For example, 1.0 = 180&deg;
If you are starting with a premade vector file, first ungroup any groups, release all compound paths (fully folded), 0.5 = 90&deg;, 0 = 0&deg; (flat).</li>
(<b>Select all + Object>Compound Path>Release</b>), and release all clipping masks (<b>Select all + Object>Clipping Mask>Release</b>).<br/> <li>This tool should be able to automatically clean files of slightly misaligned vertices, stray vertices,
Create geometry using the <b>Line Segment Tool</b>.<br/> duplicate lines (coming), and extra vertices falling in the middle of an edge (coming),
Illustrator can help you select all lines of a particular type so that you can edit their color or opacity together. Click the line, but it is recommended to remove these errors yourself in order to avoid problems.</li>
then go to <b>Select>Same>Appearance</b> to select all similar lines in the pattern. <li>If your simultion is not working, check that the pattern looks correct by clicking on the "Pattern" view in the top nav bar.</li>
To turn lines and polygons into path objects, select the geometry then right click and select <b>Make Compound Path</b>.<br/> </ul><br/>
Finally hit <b>Save As</b> and select <b>.svg</b> extension. I'm using the default SVG Tiny 1.1 settings, but I believe versions 1.0 and 1.1 will work.
<b>For Adobe Illustrator users:</b><br/><br/>
I use Illustrator to create SVGs (though any vector editing program should be fine), here are some tips I've found for making svgs to import into this tool.<br/><br/>
<ul>
<li>If you are starting with a premade vector file, first ungroup any groups, release all compound paths
(<b>Select all + Object>Compound Path>Release</b>), and release all clipping masks (<b>Select all + Object>Clipping Mask>Release</b>).</li>
<li>Create geometry using the <b>Line Segment Tool</b>.</li>
<li>Illustrator can help you select all lines of a particular type so that you can edit their color or opacity together. Click the line,
then go to <b>Select>Same>Appearance</b> to select all similar lines in the pattern.
<li>To turn lines and polygons into path objects, select the geometry then right click and select <b>Make Compound Path</b>.</li>
<li>Finally hit <b>Save As</b> and select <b>.svg</b> extension. I'm using the default SVG Tiny 1.1 settings, but I believe versions 1.0 and 1.1 will work.</li>
</ul>
</p> </p>
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
......
...@@ -202,6 +202,7 @@ function initDynamicSolver(globals){ ...@@ -202,6 +202,7 @@ function initDynamicSolver(globals){
positions[3*i+1] = nexPos.y; positions[3*i+1] = nexPos.y;
positions[3*i+2] = nexPos.z; positions[3*i+2] = nexPos.z;
if (shouldUpdateColors){ if (shouldUpdateColors){
if (nodeError>globals.strainClip) nodeError = globals.strainClip;
var scaledVal = (1-100*nodeError/globals.strainClip) * 0.7; var scaledVal = (1-100*nodeError/globals.strainClip) * 0.7;
var color = new THREE.Color(); var color = new THREE.Color();
color.setHSL(scaledVal, 1, 0.5); color.setHSL(scaledVal, 1, 0.5);
......
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