Skip to content

Instantly share code, notes, and snippets.

@REAS
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save REAS/d48fa9d2376b18fe0aa2 to your computer and use it in GitHub Desktop.
Save REAS/d48fa9d2376b18fe0aa2 to your computer and use it in GitHub Desktop.
PDF Example for the Buckeyes
import processing.pdf.*;
void setup() {
size(600, 600);
//frameRate(1);
}
void draw() {
beginRecord(PDF, "Ex_07_#######.pdf");
background(255);
float iy = random(10, 50);
float ix = random(10, 50);
for (int y = 50; y <= 550; y += iy) {
for (int x = 50; x <= 550; x += ix) {
line(x, y, x+10, y+10);
}
}
endRecord();
if (frameCount > 100) {
exit();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment