Skip to content

Instantly share code, notes, and snippets.

@pyeseul
Created October 24, 2015 19:30
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 pyeseul/b02d86b3af598e9591a7 to your computer and use it in GitHub Desktop.
Save pyeseul/b02d86b3af598e9591a7 to your computer and use it in GitHub Desktop.
int letterWidth = 10;
int letterHeight = 50;
int y = 0;
int w = 0;
int h = 0;
void setup() {
size(500, 500);
background(255);
}
void draw() {
while (y < height) {
y +=h;
w +=10;
h +=10;
for (int x = 0; x < width; x+=w) {
myDrawY(x, y, w, h);
}
}
}
void myDrawY(int x, int y, int letterWidth, int letterHeight){
stroke(0);
fill(x, y, 0);
triangle(x, y, x+letterWidth, y, x+letterWidth/2, y+letterHeight/2);
line(x+letterWidth/2, y+letterHeight/2, x, y+letterHeight);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment