This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plane folding | |
// Copyright by tsulej 2014, edited by Etienne Jacob (necessary-disorder.tumblr.com) | |
// click mouse to change drawing | |
float step ; | |
Folds f; | |
int[] folds = new int[8]; | |
void setup() { | |
randomSeed(11); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5f) | |
return 0.5f * pow(2*p, g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plane folding | |
// Copyright by tsulej 2014, edited by Etienne Jacob (necessary-disorder.tumblr.com) | |
// click mouse to change drawing | |
float step ; | |
Folds f; | |
int[] folds = new int[8]; | |
///////////////////////////////////////////////////// | |
// CHANGE THIS TO CHANGE THE 2D TRNASFORMATION USED ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plane folding | |
// Copyright by tsulej 2014, edited by Etienne Jacob (necessary-disorder.tumblr.com) | |
// click mouse to change drawing | |
float step ; | |
Folds f; | |
int[] folds = new int[8]; | |
///////////////////////////////////////////////////// | |
// CHANGE THIS TO CHANGE THE 2D TRANSFORMATION USED ! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float DT = 0.01; | |
float D = 0.001; | |
float DX = 10.0; | |
float delta = 12; | |
float lerp_back = 0.05; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float DT = 0.5; | |
float D = 1.0; | |
float DX = 1.0; | |
int n = 50; | |
int K = 18; | |
float [][] tarray = new float[n][K]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// code by Etienne Jacob (www.necessary-disorder.tumblr.com) | |
// uses openSimplex noise | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); | |
else | |
return 1 - 0.5 * pow(2*(1 - p), g); | |
} |