-
-
Save cyrstem/7425590e847380693802 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import processing.pdf.*; | |
color[] rgb = { | |
#FF0000, #00FF00, #0000FF | |
}; | |
//SPACING BETWEEN LINES | |
float spMin = 2; | |
float spMax = 4; | |
float strokeWidth = 0.5; | |
void setup() { | |
size(792, 612); | |
} | |
void draw() { | |
beginRecord(PDF, "########.pdf"); | |
background(255); | |
strokeWeight(strokeWidth); | |
for (int i = 0; i < rgb.length; i++) { | |
pushMatrix(); | |
translate(width/2, height/2); | |
rotate(random(TWO_PI)); | |
float sp = random(spMin, spMax); | |
for (float x = -width; x <= width; x+=sp) { | |
sp = random(spMin, spMax); | |
stroke(rgb[i]); | |
line(x+sp, -1080, x+sp, 1080); | |
} | |
popMatrix(); | |
} | |
endRecord(); | |
if (frameCount > 12) { | |
exit(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment