Created
September 26, 2012 12:33
-
-
Save lizkhoo/3787765 to your computer and use it in GitHub Desktop.
Grass
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 ax = -20; | |
int ay = -20; | |
int bx = 0; | |
int by = 0; | |
int cx = -10; | |
int cy = 60; | |
int dx = 0; | |
int dy = 60; | |
void setup(){ | |
size(500,500); | |
background(255); | |
} | |
void draw(){ | |
strokeWeight(3); | |
for (int i = 0; i < width+20; i+=10){ | |
for (int u = 0; u < height; u+=20){ | |
stroke(0, random(90,200), random(90,200)); | |
bezier(ax+i, ay+u*2, bx+i, by+u*2, cx+i, cy+u*2, dx+i,dy+u*2); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment