FOR INTERACTIVE SKETCH, CLICK HERE.
^the program runs too slow on this page…
Textures series, 2018-current.
Rendered with code in Processing.
Exploring patterns and repetition.
More coming soon.
int x;
int xS = 2;
int y;
int w = 10;
int h = 100;
float rot;
float rotS = PI/20;
float shade = 0;
float shadeIncrease = -.75;
float shadeR = 255;
float shadeG = 255;
float shadeB = 255;
float randR = random(0, 250);
float randG = random(0, 250);
float randB = random(0, 250);
float nextR = 255;
float nextG = 255;
float nextB = 255;
void setup() {
size(320, 500);
background(255);
}
void draw() {
strokeWeight(3);
stroke(0);
fill (shadeR+randR*random(1, 2), shadeG+randG*random(1, 2), shadeB+randB*random(1, 2));
translate(width/2, height/2);
rectMode(CENTER);
rotate(rot);
x+=(xS/2);
rect(x, y, w, h);
rot+=rotS;
if (rot%20>=10) {
shade = 0;
shadeIncrease = -.75;
xS*=-1;
}
shade += shadeIncrease;
shadeR = shade+shadeIncrease*.2;
shadeG = shade+shadeIncrease*.2;
shadeB = shade+shadeIncrease*.2;
}
void mouseClicked() {
background(255);
x = 0;
xS = 2;
y = 0;
w = 10;
h = 100;
rot= 0;
rotS = PI/20;
int colorSchemer = int(random(3));
if (colorSchemer == 0) {
//red
nextR = 250;
nextG = 0;
nextB = 0;
} else if (colorSchemer == 1) {
//green
nextR = 0;
nextG = 255;
nextB = 0;
} else if (colorSchemer == 2) {
//blue
nextR = 0;
nextG = 0;
nextB = 255;
}
randR = random(nextR, 250);
randG = random(nextG, 250);
randB = random(nextB, 250);
shadeR = random(0, 250);
shadeG = random(0, 250);
shadeB = random(0, 250);
shade = 0;
shadeIncrease = -.75;
}
Seriously, don’t open the code on your phone.