Skip to content

Instantly share code, notes, and snippets.

@pyeseul
Created October 21, 2015 22:24
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/4e0fc1a4ecaa02db697f to your computer and use it in GitHub Desktop.
Save pyeseul/4e0fc1a4ecaa02db697f to your computer and use it in GitHub Desktop.
Processing Exercise 2
void setup() {
size(500, 500);
background(255);
}
void draw() {
for (int x = 0; x<500; x+=50) {
for (int y = 0; y<500; y+=50) {
drawY(x, y);
}
}
}
void drawY(int x, int y){
stroke(0);
fill(x, y, 0);
triangle(x, y, x+50, y, x+25, y+50);
line(x+25, y+50, x, y+100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment