Skip to content

Instantly share code, notes, and snippets.

@josephtaylor
Created June 20, 2018 13:31
Show Gist options
  • Save josephtaylor/d9e9902fb5df75761cf01aa9f1b52e07 to your computer and use it in GitHub Desktop.
Save josephtaylor/d9e9902fb5df75761cf01aa9f1b52e07 to your computer and use it in GitHub Desktop.
blurry-lines processing sketch
import java.time.LocalDateTime;
void setup() {
size(500,500);
background(255);
colorMode(RGB);
}
void draw() {
stroke(0,0,0,128);
filter(BLUR);
pushMatrix();
translate(width / 2, height / 2);
rotate(random(PI));
for (int i = 0; i < 100; i++) {
float startX = random(width);
float startY = random(-height / 2, height / 2);
float endX = random(width);
float endY = random(-height / 2, height / 2);
line(startX, startY, endX, endY);
ellipse(startX, startY, 10, 10);
ellipse(endX, endY, 10, 10);
}
popMatrix();
if (frameCount == 20) {
//saveFrame(LocalDateTime.now() + ".png");
noLoop();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment