Skip to content

Commit

Permalink
papers, projects updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgios Kaleadis committed Jan 13, 2018
1 parent e377316 commit ff40be9
Show file tree
Hide file tree
Showing 1,043 changed files with 193,341 additions and 0 deletions.
10 changes: 10 additions & 0 deletions LOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 180113
Back in the project today. I lost motivation after reading paper after paper about the origami theory last July.
In the meantime I focused on my analog origami folding skills. I now own beautiful books by Robert J. Lang about Origami design and Shuzo Fujimoto's master piece about origami tesselation.
I learned many new models by watching and reading Sara Adam's happyfolding.com. My favorite models todya are the [hyndrangea](https://www.youtube.com/watch?v=zu5F0Hmd3ZA), [the clover tesselation](https://www.youtube.com/watch?v=474PmBXekK8&t), I learned a [nice unicorn](https://www.youtube.com/watch?v=uSucN4qcY9I), a [heart in a heart](https://www.youtube.com/watch?v=lW-ocuUNXBA), a [beautiful butterfly](https://www.youtube.com/watch?v=X_7te7WanRY) and many more so that the time went by quickly without touching my codebase here.

So today is all about papers to get my hands dirty again. I added two new papers I found,
and added some new sources of projects I found in the last weeks.

My challenge is not to get the folding reflected in code. That's okay I think but to get the fundamental rendering problem of two and more faces in origami being mathematical on the same plane which will of course cause flickering as described in my last entry from 2017. The other problem was about animating the faces which could get easier once I have a better mathematical understanding of the underlying parts in origami.

## 170705
I found [THAT][origami-render-01] and [THIS][origami-render-02]
Two pdf files with science about rendering origamis from around 2008/2009.
Expand Down
Binary file added research/papers/5OSME.pdf
Binary file not shown.
File renamed without changes.
Binary file added research/papers/TachiFreeformOrigami2010.pdf
Binary file not shown.
Binary file added research/papers/fold-paper.pdf
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions research/projects/OrigamiSimulator-master/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
assets/attrib.txt
.idea/
todo.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import processing.pdf.*;

float numSegs = 100;//number of radial segments, this can be reduced to 4 to do a regular hypar
float outerRad = 200;//radius of outer border
float spacing = 8;//radial space between neighboring creases
int numPleats = 7;//number of mountain/valley pairs of circular creases

boolean antisym = true;//symmetric vs antisymmetric triangulation
boolean triangulationsAsHinges = false;//draw triangulations as facets creases (yellow) or undriven hinges (magenta)

void setup(){

size(450, 450);

//tessellation
beginRecord(PDF, "Hypar.pdf");
background(255);
pushMatrix();
translate(width/2, height/2);

//outer border
stroke(0);
drawRing(outerRad);

//creases and triangulations
float rad = outerRad;
for (int i=0;i<numPleats;i++){
drawHinges(rad, true);
rad -= spacing;
stroke(255,0,0);
drawRing(rad);
drawHinges(rad, false);
rad -= spacing;
stroke(0,0,255);
drawRing(rad);
}
drawHinges(rad, true);

//inner border
rad -= spacing;
stroke(0);
drawRing(rad);

//radial facet creases
stroke(255,255,0);
for (float i=0;i<numSegs;i++){
float theta = i/numSegs*2*PI;
line(outerRad*cos(theta), outerRad*sin(theta), rad*cos(theta), rad*sin(theta));
}

endRecord();
println("Finished.");
// exit();
}

void drawHinges(float rad, boolean opp){
if (triangulationsAsHinges) stroke(255,0,255);
else stroke(255,255,0);
for (float i=0;i<numSegs;i++){
float theta = i/numSegs*2*PI;
if (antisym){
if (opp){
if (i%2==0) line(rad*cos(theta), rad*sin(theta), (rad-spacing)*cos(theta-1.0/numSegs*2*PI), (rad-spacing)*sin(theta-1.0/numSegs*2*PI));
else line((rad-spacing)*cos(theta), (rad-spacing)*sin(theta), rad*cos(theta-1.0/numSegs*2*PI), rad*sin(theta-1.0/numSegs*2*PI));
} else {
if (i%2==1) line(rad*cos(theta), rad*sin(theta), (rad-spacing)*cos(theta-1.0/numSegs*2*PI), (rad-spacing)*sin(theta-1.0/numSegs*2*PI));
else line((rad-spacing)*cos(theta), (rad-spacing)*sin(theta), rad*cos(theta-1.0/numSegs*2*PI), rad*sin(theta-1.0/numSegs*2*PI));
}
} else{
if (i%2==0) line(rad*cos(theta), rad*sin(theta), (rad-spacing)*cos(theta-1.0/numSegs*2*PI), (rad-spacing)*sin(theta-1.0/numSegs*2*PI));
else line((rad-spacing)*cos(theta), (rad-spacing)*sin(theta), rad*cos(theta-1.0/numSegs*2*PI), rad*sin(theta-1.0/numSegs*2*PI));
}
}
}

void drawRing(float rad){
for (float i=0;i<numSegs;i++){
float theta = i/numSegs*2*PI;
line(rad*cos(theta), rad*sin(theta), rad*cos(theta-1.0/numSegs*2*PI), rad*sin(theta-1.0/numSegs*2*PI));
}
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
mode.id=processing.mode.java.JavaMode
mode=Java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
These are <a href="https://processing.org/" target="_blank">Processing</a> scripts I used to generate crease patterns
for some of the examples in the app. Processing exports pdfs with a
clipping mask, you will need to pull this into a vector editing program to remove
the clipping mask and save as SVG before importing it into the Origami Simulator app.
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
import processing.pdf.*;

boolean mountValleyColors = true;
boolean dashedCreaseLines = true;

float angle = PI/3;// PI/2 > angle > 0
float edgeLength = 72;//1in and 72dpi
float diagLength = 2*edgeLength/sqrt(2);

void setup() {
size(400, 400);

//tesselation
beginRecord(PDF, "squaretwisttesselation.pdf");
background(255);

makeUnitCell(200,200);

endRecord();

//single twist
beginRecord(PDF, "squaretwist.pdf");
background(255);
makeSingleUnitCell(width/2,height/2);
endRecord();

//many single twists
size(700, 700);
beginRecord(PDF, "squaretwistManyAngles.pdf");

background(255);
for (int i=0;i<3;i++){
for (int j=0;j<3;j++){
float index = i*3+j;
angle = map(index, 0, 8, PI/6, 2*PI/6);
makeSingleUnitCell(j*width/3+width/6,i*height/3+height/6);
}
}

endRecord();

// // Exit the program
println("Finished.");
exit();
}

void makeSingleUnitCell(float x, float y){
makeUnitCell(x, y, true, true, true, true, true);
}

void makeUnitCell(float x, float y){
makeUnitCell(x, y, false, false, false, false, false);
}

void makeUnitCell(float x, float y, boolean allBounds,
boolean leftBounds, boolean topBounds, boolean bottomBounds, boolean rightBounds){
pushMatrix();
translate(x, y);
rotate(-angle/2);

setMountainColor();
//top
float square1X = diagLength/2*sin(angle-PI/4);
float square1Y = -diagLength/2*cos(angle-PI/4);

//right
float square2X = diagLength/2*sin(angle+PI/4);
float square2Y = -diagLength/2*cos(angle+PI/4);

drawCrease(square1X, square1Y, square1X, square1Y-edgeLength);
drawCrease(-square1X, -square1Y, -square1X, -square1Y+edgeLength);

drawCrease(square2X, square2Y, square2X+edgeLength, square2Y);
drawCrease(-square2X, -square2Y, -square2X-edgeLength, -square2Y);

//inner square
drawCrease(square1X, square1Y, square2X, square2Y);
drawCrease(square1X, square1Y, -square2X, -square2Y);
drawCrease(-square1X, -square1Y, square2X, square2Y);
drawCrease(-square1X, -square1Y, -square2X, -square2Y);

//bounds
if (allBounds) setCutColor();

if (leftBounds){
//left
line(square1X-edgeLength, square1Y-edgeLength, square1X-edgeLength, square1Y);
line(square1X-edgeLength, square1Y, -square2X-edgeLength, -square2Y);
line(-square2X-edgeLength, -square2Y, -square2X-edgeLength, -square2Y+edgeLength);
}

if (topBounds){
//top
line(square1X, square1Y-edgeLength, square1X-edgeLength, square1Y-edgeLength);
line(square1X, square1Y-edgeLength, square2X, square2Y-edgeLength);
line(square2X, square2Y-edgeLength, square2X+edgeLength, square2Y-edgeLength);
}

if (rightBounds){
//right
line(square2X+edgeLength, square2Y-edgeLength, square2X+edgeLength, square2Y);
line(square2X+edgeLength, square2Y, -square1X+edgeLength, -square1Y);
line(-square1X+edgeLength, -square1Y, -square1X+edgeLength, -square1Y+edgeLength);
}

if (bottomBounds){
//bottom
line(-square1X+edgeLength, -square1Y+edgeLength, -square1X, -square1Y+edgeLength);
line(-square1X, -square1Y+edgeLength, -square2X, -square2Y+edgeLength);
line(-square2X, -square2Y+edgeLength, -square2X-edgeLength, -square2Y+edgeLength);
}

setValleyColor();
drawCrease(square1X, square1Y, square1X-edgeLength, square1Y);
drawCrease(-square1X, -square1Y, -square1X+edgeLength, -square1Y);

drawCrease(square2X, square2Y, square2X, square2Y-edgeLength);
drawCrease(-square2X, -square2Y, -square2X, -square2Y+edgeLength);

popMatrix();
}

void setMountainColor(){
if (mountValleyColors){
stroke(0,0,255);//blue
} else {
setCreaseColor();
}
}

void setValleyColor(){
if (mountValleyColors){
stroke(255,0,0);//red
} else {
setCreaseColor();
}
}

void setCutColor(){
stroke(0);//black
}

void setCreaseColor(){
stroke(255,0,0);//red
}

void drawCrease(float x1, float y1, float x2, float y2){
if (dashedCreaseLines){
dashedLine(x1, y1, x2, y2, 6, 6);
} else {
line(x1, y1, x2, y2);
}
}

void dashedLine(float x1, float y1, float x2, float y2, float dashLength, float spaceLength){
pushMatrix();
translate(x1, y1);
rotate(atan2(y2-y1, x2-x1));
float lineLength = sqrt((y2-y1)*(y2-y1) + (x2-x1)*(x2-x1));
float partialDash = lineLength/(dashLength+spaceLength) - floor(lineLength/(dashLength+spaceLength));
for (float i=(partialDash+spaceLength)/2;i<lineLength;i+=dashLength+spaceLength){
line(i, 0, i+dashLength, 0);
}
popMatrix();
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
import processing.pdf.*;

float triangleHeight = 40;//40px/72dpi = ~0.55in tall
boolean dashedCreaseLines = true;

void setup() {

//20in*72dpi= 1440px
size(1440, 1440, PDF, "tritesselation.pdf");
background(255);

//horizontal lines
for (float i=triangleHeight;i<height;i+=triangleHeight){
drawCrease(0, i, width, i);
}

// \\\\\\ lines
for (float i=-height/sqrt(3);i<width;i+=2*triangleHeight/sqrt(3)){

float xPos = i+height/sqrt(3);
if (xPos>width){
float xDiff = xPos-width;
drawCrease(i, 0, width, height-xDiff*sqrt(3));
} else if (i<0){
float xDiff = -i;
drawCrease(0, xDiff*sqrt(3), i+height/sqrt(3), height);
} else {
drawCrease(i, 0, i+height/sqrt(3), height);
}
}

// //////// lines
for (float i=0;i<width+height/sqrt(3);i+=2*triangleHeight/sqrt(3)){

float xPos = i-height/sqrt(3);
if (i>width){
float xDiff = i-width;
drawCrease(width, xDiff*sqrt(3), i-height/sqrt(3), height);
} else if (xPos<0){
float xDiff = -xPos;
drawCrease(i, 0, 0, height - xDiff*sqrt(3));
} else {
drawCrease(i, 0, i-height/sqrt(3), height);
}

}

// Exit the program
println("Finished.");
exit();
}

void drawCrease(float x1, float y1, float x2, float y2){
if (dashedCreaseLines){
float numDashesPerSide = 5;
float dashLength = triangleHeight*2/sqrt(3)/(numDashesPerSide*2);
dashedLine(x1, y1, x2, y2, dashLength, dashLength);
} else {
line(x1, y1, x2, y2);
}
}

void dashedLine(float x1, float y1, float x2, float y2, float dashLength, float spaceLength){
pushMatrix();
translate(x1, y1);
rotate(atan2(y2-y1, x2-x1));
float lineLength = sqrt((y2-y1)*(y2-y1) + (x2-x1)*(x2-x1));
float partialDash = lineLength/(dashLength+spaceLength) - floor(lineLength/(dashLength+spaceLength));
println(partialDash);
for (float i=(partialDash+spaceLength)/2;i<lineLength;i+=dashLength+spaceLength){
line(i, 0, i+dashLength, 0);
}
popMatrix();
}
Loading

0 comments on commit ff40be9

Please sign in to comment.