More about random and variables
float x1,y1,x2,y2,x3,y3,x4,y4;
void draw() {
background(200);
framerate(10);
smooth();
x1 = random(10,40);
y1 = random(10,40);
x2 = 90;
y2 = 10;
x3 = mouseX;
y3 = mouseY;
x4 = 10;
y4 = 90;
quad(x1,y1,x2,y2,x3,y3,x4,y4);
}

0 Comments:
Post a Comment
<< Home