homework 2.2

part 2

// sketch
int EW=100;
int EH=100;

float EY;
float EX;
float r;
float g;
float b;
float x;
float y;
float w;
float h;

void setup (){
size(600,600);

EW=(100);
EH=(100);

 
background(255);
}

void draw() {
r=random(255);
g=random(255);
b=random(255);
x=random(600);
y=random(600);
fill(r,g,b);
ellipse(x,y,EW,EH);
EW=EW+1;
EH=EH+1;

EW=constrain(20,30,40);
EH=constrain(20,30,40);
}
void mousePressed(){

w=random(600);
h=random(600);

fill(r,g,b,200);
rect(x,y,w,h);

and part 1

 

int r =225;
int g =225;
int b =225;

boolean sunny = false;

float x=12.0;
float z;

z = x+25;
float y = z+x;

 

figuring out the random took me like 3 hours >.> (lol) jesus

Print this page
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *