Skip to content

Instantly share code, notes, and snippets.

@bertrandom
Created March 19, 2015 07:12
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 bertrandom/9382a38e54c7d1767d9c to your computer and use it in GitHub Desktop.
Save bertrandom/9382a38e54c7d1767d9c to your computer and use it in GitHub Desktop.
void setup() {
background(255, 255, 255);
size(1120, 860);
translate(50, height - 15);
scale(0.1,-0.1);
frameRate(30);
stroke(0);
rect(200, 550, 9800, 7225);
}
int x = 100;
int y = 475;
void drawline(int x1, int y1, int x2, int y2) {
line(x1, y1, x2, y2);
println("PU" + (int) x1 + "," + (int) y1 + ";");
println("PD" + (int) x2 + "," + (int) y2 + ";");
}
void draw() {
translate(50, height - 15);
scale(0.1,-0.1);
x = x + 100;
if (x <= 10000) {
drawline(x, 550, 5100, 4162);
drawline(x, 7775, 5100, 4162);
}
y = y + 75;
if (y <= 7775) {
drawline(200, y, 5100, 4162);
drawline(10000, y, 5100, 4162);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment