Created
October 21, 2015 22:24
-
-
Save pyeseul/4e0fc1a4ecaa02db697f to your computer and use it in GitHub Desktop.
Processing Exercise 2
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
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