Created
October 24, 2015 19:30
-
-
Save pyeseul/b02d86b3af598e9591a7 to your computer and use it in GitHub Desktop.
This file contains 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
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