homework 2.2 part 2

//My new creation updated a little.

int s =260;
int a =540;
int b= 80;
int c= 20;

void setup() {
size(800,600);
}
void keyPressed(){
background(mouseX,mouseY,0);
}
void mousePressed(){
fill(mouseX,mouseY,0);//set red color
rect(0,0,200,445);//uno rectangle
fill(mouseX,mouseY,0);//set color green
rect(559,0,230,445);//3rd rectangle
}
void draw(){
//face
fill(39,160,54);
ellipse(400,300,200,200);

//eyes
fill(39,109,227);
ellipse(360,s,25,25);
ellipse(430,s,25,25);
fill(0,255,0);
ellipse(360,s,12,12);
ellipse(430,s,12,12);
fill(0,0,0);
ellipse(360,s,5,5);
ellipse(430,s,5,5);

//body
fill(31,147,111);
rect(370,397,60,100);//inserting rectangle

//insertting ground floor.
fill(147,61,61);
rect(0,450,800,600);
fill(255);
rect(20, a, 50, c);
rect(150, a, b, c);
rect(280, a, b, c);
rect(410, a, b, c);
rect(540, a, b, c);

fill(100-mouseX);
ellipse(mouseX,60,100,100);
}

Posted in Uncategorized | Leave a comment

Matthew Soto 2/14/13 HW 2.2

int circleX= 15;
int circleY= 20;
int circleW= 25;
int circleH= 25;
int fillX= 255;

void setup(){
background(0,0,0);//sky, light blue
fill(255, 255, 255);//Color of the sun, yellow
ellipse(circleX, circleY, 25, 25);//Shape and position of the sun
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void draw(){//Animation for the moon going down
fill(255, 255,255);
ellipse(circleX, circleY, 25, 25);//Shape and position of the sun
circleY= circleY+1;
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void mousePressed(){//When you click the mouse it turns to the day time
background(0, 159, 255);//sky, light blue
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
fill(250, 255, 0);//Color of the sun, yellow
ellipse(15, 20, 25, 25);//Shape and position of the sun
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}
void mouseDragged(){//when you drag it gives you the different shades of night.
background(0, 159, 255);//sky, light blue
background (mouseX,mouseY);
fill(170, 0, 0);//House, fill in color
rect(32, 50, 55, 55);//Shape and positon of the house
stroke(205, 209, 4);//stroke color of the sun, dark yellow
fill(250, 255, 255);//Color of the sun, yellow
ellipse(15, 20, 25, 25);//Shape and position of the sun
stroke(0);//stroke of the roof
fill(129, 29, 29);//Color of the chimney
rect(37, 20, 10, 30);//shape and postion of the chimney,
fill(75, 75, 75);//color of the top part of chimney
triangle(30, 50, 60, 20, 90, 50);//shape and position of the roof
fill(222, 222, 222);//color of the left window
rect(35, 55, 15, 15);//Shape and position of the left window
fill(222, 222, 222);//color of the right window
rect(70, 55, 15, 15);//shape and postion of the right window
fill(106, 70, 41);//color of the door
rect(55, 80, 10, 50);//shape and position of the door
fill(49, 49, 49);//color of the upper part of the chimney
rect(31, 18, 20, 10);//shape and position of the upper part of the chimney
}

Posted in Uncategorized | Leave a comment

//Alyssa Seosankar – Prof. Higgins – HW 2.2 Part 1 – Due 02/13/13

//Alyssa Seosankar – Prof. Higgins – HW 2.2 Part 1 – Due 02/13/13

int r= 255;
int g= 255;
int b= 255;
boolean sunny= false;
float x= 12.0;
float z= 0;
z= x+25;
float y= z+x;

Posted in Uncategorized | Leave a comment

Homework 2.2 part 2 – Jad Atoui

//homework 2.2 part 2

float a = 0.0;
float inc = TWO_PI/50;
float prev_x = 0, prev_y = 300, x, y;
int d = 200;
int r = 100;
float amp = 300;
int strokeColor = 128;

void setup(){
size(800, 600);
background(0);
stroke(255);
for(int i=0; i<800; i=i+4) {
x = i;
y = 300 + sin(a) * 80.0 + random(4);
line(prev_x, prev_y, x, y);
prev_x = x;
prev_y = y;
a = a + inc;
}
}
void keyPressed() {
strokeColor = int(random(255));
}

void draw(){
background(0);
color red = color(100,0,0);
stroke(strokeColor);
prev_x = 0;
prev_y = 300;
for(int i=0; i<800; i=i+4) {
x = i;
y = amp + cos(a) * 80.0 + random(random(50));
line(prev_x, prev_y, x, y);

stroke(strokeColor);
y = mouseX + sin(a) * 80.0 + random(random(mouseY));
line(prev_x, prev_y, x, y);

prev_x = x;
prev_y = y;

a = a + inc;

}
stroke(150);
fill(strokeColor,132,0);
ellipse(d,r , 75, 75);
fill(int(random(0,r)),int(random(0,r)),int(random(0,r)));
ellipse(d,100, 25, 25);
stroke(150);
fill(255,132,0);
ellipse(600,100 , 75, 75);
fill(int(random(0,50)),int(random(0,50)),int(random(0,50)));
ellipse(600,100, 25, 25);
}

 

http://www.openprocessing.org/sketch/89374

Posted in Uncategorized | Leave a comment

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

Posted in Uncategorized | Leave a comment

Homework 2.2 part 1 – Jad Atoui

//Homework 2.2 part 1 – Jad Atoui

int r = 255;
int g = 255
boolean sunny = false;
float x = 12.0;
float z;
z = x + 25;
float y = z + x;

Posted in Uncategorized | Leave a comment

Chris Pro homework 2.2 part 2

//Smiley Face Chris Pro
//click the mouse anywhere to change background color
//press a key and a body appears
//animation will change line weight

int frekSize = 7;

//Window Size
void setup() {
size(800, 600);
background(0);
}
void mousePressed() {
//Background Color Changes
background(mouseX, mouseY, mouseX);
}
void draw() {
strokeWeight(random(1,13));
//face
fill(255, 246, 142);
ellipse(400, 300, 200, 200);
//eyes
fill(255, 255, 255);
ellipse(360, 260, 25, 25);
ellipse(430, 260, 25, 25);
fill(0, 255, 0);
ellipse(360, 260, 12, 12);
ellipse(430, 260, 12, 12);
fill(0, 0, 0);
ellipse(360, 260, 5, 5);
ellipse(430, 260, 5, 5);
//nose
line(395, 275, 395, 315);
line(395, 315, 410, 315);
//freckles
fill(183, 174, 78);
ellipse(330, 295, frekSize, frekSize);
ellipse(360, 295, frekSize, frekSize);
ellipse(345, 315, frekSize, frekSize);
ellipse(430, 295, frekSize, frekSize);
ellipse(460, 295, frekSize, frekSize);
ellipse(445, 315, frekSize, frekSize);
//glasses
fill(255, 255, 255, 0);
rect(340, 247, 40, 25);
rect(410, 247, 40, 25);
line(380, 259.5, 410, 259.5);
line(340, 259.5, 315, 247);
line(450, 259.5, 485, 247);
//Mouth
fill(255, 0, 0);
bezier(350, 350, 375, 400, 425, 400, 450, 350);
//Hair
fill(242, 155, 24);
triangle(340, 200, 380, 200, 340, 230);
triangle(340, 200, 380, 200, 355, 230);
triangle(350, 200, 400, 200, 375, 230);
triangle(370, 200, 410, 200, 385, 230);
triangle(410, 200, 430, 200, 385, 230);
triangle(400, 200, 450, 200, 425, 230);
triangle(425, 200, 460, 200, 460, 230);
}
void keyPressed() {
//Stick Figure Body
line(400, 400, 400, 500);
line(400, 435, 365, 415);
line(400, 435, 435, 415);
line(400, 500, 365, 525);
line(400, 500, 435, 525);
}

Posted in Uncategorized | Leave a comment

Hw 2.2 one and two

int r = 255;
int g = 255;
int b = 255;
boolean sunny = false;
float x = 12.0;
float z;
z = x+25;
float y = z+x;

here is part 2

http://www.openprocessing.org/sketch/89398

Posted in Uncategorized | Leave a comment

Jack’s Homework 2.2 Part 2

Exact link here:

http://www.openprocessing.org/sketch/89372

Posted in Uncategorized | Leave a comment

Jack’s Homework 2.2 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;

Posted in Uncategorized | Leave a comment