
int r,g,b;
float x, y;
int i=0;
void setup()
{
size(600,600);
background(0,0,0);
//center
x = width/2;
y = height/2;
i=0;
r=0;
g=0;
b=0;
frameRate(60);
smooth();
}
void draw(){
//loop through and draw a triangles
background(0,0,0);
translate(x, y);
//i++;
r=(int)random(255);
g=(int)random(255);
b=(int)random(255);
color c = color(r, g, b);
fill(c);
//rotate(i);
beginShape(POLYGON);
vertex(0, -100);
vertex(-100, 100);
vertex(100, 100);
endShape();
}

No comments:
Post a Comment