Commit e8d0396f authored by amandaghassaei's avatar amandaghassaei
Browse files

hypar

parent 8464d32d
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1566px" height="1174px" viewBox="0 0 1566 1174" enable-background="new 0 0 1566 1174" xml:space="preserve">
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-miterlimit="10" d="M1008,1008H144V144h864V1008z"/>
<path fill="none" stroke="#0000FF" stroke-linecap="round" stroke-miterlimit="10" d="M972,972H180V180h792V972z M936,216H216v720
h720V216z M900,252H252v648h648V252z M864,288H288v576h576V288z M828,324H324v504h504V324z M792,360H360v432h432V360z M756,396H396
v360h360V396z M720,432H432v288h288V432z M684,468H468v216h216V468z M990,990l-18-18 M954,954l-18-18 M918,918l-18-18 M882,882
l-18-18 M846,846l-18-18 M810,810l-18-18 M774,774l-18-18 M738,738l-18-18 M702,702l-18-18 M468,468l-18-18 M432,432l-18-18
M396,396l-18-18 M360,360l-18-18 M324,324l-18-18 M288,288l-18-18 M252,252l-18-18 M216,216l-18-18 M180,180l-18-18 M990,162
l-18,18 M954,198l-18,18 M918,234l-18,18 M882,270l-18,18 M846,306l-18,18 M810,342l-18,18 M774,378l-18,18 M738,414l-18,18
M702,450l-18,18 M162,990l18-18 M198,954l18-18 M234,918l18-18 M270,882l18-18 M306,846l18-18 M342,810l18-18 M378,774l18-18
M414,738l18-18 M450,702l18-18"/>
<path fill="none" stroke="#000000" stroke-linecap="round" stroke-miterlimit="10" d="M666,486H486v180h180V486z"/>
<path fill="none" stroke="#FF0000" stroke-linecap="round" stroke-miterlimit="10" d="M990,990H162V162h828V990z M954,198H198v756
h756V198z M918,234H234v684h684V234z M846,306H306v540h540V306z M882,270H270v612h612V270z M810,342H342v468h468V342z M774,378H378
v396h396V378z M738,414H414v324h324V414z M702,450H450v252h252V450z M1008,1008l-18-18 M972,972l-18-18 M936,936l-18-18 M900,900
l-18-18 M864,864l-18-18 M828,828l-18-18 M792,792l-18-18 M756,756l-18-18 M720,720l-18-18 M486,486l-18-18 M450,450l-18-18
M414,414l-18-18 M378,378l-18-18 M342,342l-18-18 M306,306l-18-18 M270,270l-18-18 M234,234l-18-18 M198,198l-18-18 M162,162
l-18-18 M1008,144l-18,18 M972,180l-18,18 M936,216l-18,18 M900,252l-18,18 M864,288l-18,18 M828,324l-18,18 M792,360l-18,18
M756,396l-18,18 M720,432l-18,18 M684,468l-18,18 M144,1008l18-18 M180,972l18-18 M216,936l18-18 M252,900l18-18 M288,864l18-18
M324,828l18-18 M360,792l18-18 M396,756l18-18 M432,720l18-18 M468,684l18-18 M666,666l18,18"/>
<path fill="none" stroke="#FFFF00" stroke-linecap="round" stroke-miterlimit="10" d="M162,990l-18-846 M972,972l-810,18 M198,954
l-18-774 M936,936l-738,18 M234,918l-18-702 M900,900l-666,18 M270,882l-18-630 M864,864l-594,18 M306,846l-18-558 M828,828l-522,18
M342,810l-18-486 M792,792l-450,18 M378,774l-18-414 M756,756l-378,18 M414,738l-18-342 M720,720l-306,18 M450,702l-18-270
M684,684l-234,18 M486,666l-18-198 M144,144l846,18 M162,990l18-810 M180,180l774,18 M198,954l18-738 M216,216l702,18 M234,918
l18-666 M252,252l630,18 M270,882l18-594 M288,288l558,18 M306,846l18-522 M324,324l486,18 M342,810l18-450 M360,360l414,18
M378,774l18-378 M396,396l342,18 M414,738l18-306 M432,432l270,18 M450,702l18-234 M468,468l198,18 M990,162l18,846 M180,180
l810-18 M954,198l18,774 M216,216l738-18 M918,234l18,702 M252,252l666-18 M882,270l18,630 M288,288l594-18 M846,306l18,558
M324,324l522-18 M810,342l18,486 M360,360l450-18 M774,378l18,414 M396,396l378-18 M738,414l18,342 M432,432l306-18 M702,450
l18,270 M468,468l234-18 M666,486l18,198 M1008,1008l-846-18 M990,162l-18,810 M972,972l-774-18 M954,198l-18,738 M936,936l-702-18
M918,234l-18,666 M900,900l-630-18 M882,270l-18,594 M864,864l-558-18 M846,306l-18,522 M828,828l-486-18 M810,342l-18,450
M792,792l-414-18 M774,378l-18,378 M756,756l-342-18 M738,414l-18,306 M720,720l-270-18 M702,450l-18,234 M684,684l-198-18"/>
</svg>
......@@ -380,6 +380,8 @@
<li><a href="#" class="demo" data-url="Tessellations/singlesquaretwist.svg">Square Twist (single)</a></li>
<li><a href="#" class="demo" data-url="Tessellations/squaretwistManyAngles.svg">Square Twist (many angles)</a></li>
<li><a href="#" class="demo" data-url="Tessellations/reschtritessellation.svg">Resch Triangle Tessellation</a></li>
<li><a href="#" class="demo" data-url="Origami/hypar.svg">Hypar (not fully working yet)</a></li>
</ul>
</li>
<li><a class="loadFile" href="#">Import .txt...</a></li>
......
......@@ -123,7 +123,7 @@ function initModel(globals){
geometry.verticesNeedUpdate = true;
// geometry.computeFaceNormals();
geometry.computeFlatVertexNormals();
geometry.center();
// geometry.center();
});
}
......@@ -208,6 +208,12 @@ function initModel(globals){
geometry.computeFaceNormals();
geometry.computeBoundingBox();
geometry.computeBoundingSphere();
geometry.center();
//update vertices
for (var i=0;i<vertices.length;i++){
nodes[i].setOriginalPosition(vertices[i]);
}
globals.threeView.sceneAddModel(object3D);
......
......@@ -189,6 +189,9 @@ Node.prototype.renderChange = function(change){
Node.prototype.getOriginalPosition = function(){
return this._originalPosition.clone();
};
Node.prototype.setOriginalPosition = function(position){
this._originalPosition = position.clone();
};
Node.prototype.getPosition = function(){
return this.object3D.position;
......
Supports Markdown
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