Skip to content

Instantly share code, notes, and snippets.

@Bleuje
Bleuje / sierpinsky.pde
Created July 18, 2017 21:35
Sierpinsky loop
// using code by dave aka @beesandbombs :)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
//using code by dave (@beesandbombs)
int[][] result;
float t, c;
float ease(float p) {
return 3*p*p - 2*p*p*p;
}
float ease(float p, float g) {
int NB_FRAMES = 40;
int w = 500;
int h = 500;
// INCREASE THIS FOR FASTER RENDERING
int scl = 1;
int cols,rows;
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);
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);
class Center{
float x = random(width);
float y = random(height);
float rot = random(-10,10);
void show(){
stroke(255,0,0);
strokeWeight(3);
point(x,y);
class Center{
float x = random(width);
float y = random(height);
float rot = random(-10,10);
float repulse = random(-4,2);
void show(){
stroke(255,0,0);
strokeWeight(3);
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);
class Center{
/*
float rad = height/3*sqrt(random(1));
float theta = random(TWO_PI);
float x = width/2 + rad*cos(theta);
float y = height/2 + rad*sin(theta);*/
float x = random(width);
float y = random(height);
float rot = random(-10,0);
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);
}
class Center{
float rad = height/3*sqrt(random(1));