
final int screenwid = 720;
final int screenhei = 480;
void setup()
{
size(screenwid, screenhei);
noLoop();
}
void draw()
{
for(int i = 0; i < 5; i++) {
triang(int(random(screenwid)), int(random(screenhei)),
int(random(screenwid)), int(random(screenhei)),
int(random(screenwid)), int(random(screenhei)));
}
}
void triang(int x0, int y0, int x1, int y1, int x2, int y2) {
line(x0, y0, x1, y1);
line(x1, y1, x2, y2);
line(x2, y2, x0, y0);
}
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment