Alyssa Seosankar – Prof. Higgins – HW 3.2 Part 3 – Due 02/18/13

//Alyssa Seosankar – Prof. Higgins – HW 3.2 Part 3 – Due 02/18/13

int x = 100;
int speed = 1;
int ball = color(159, 0, 244);

void setup(){
//Setting window size
size(400, 500);
}

void draw(){
//Setting background color
background(255);
//Drawing the ball
fill(ball);
stroke(0);
strokeWeight(4);
ellipse(x, mouseY, 100, 100);
//Setting the speed & movement of ball
if(x > width){
speed = speed * -1;
}
else if(x 0);
ball = ball + 1;

}

Posted in Uncategorized | Leave a comment

HW 3.2 Part 3

int x = 100;
int speed = 7;

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

void draw() {
background(0);
noStroke();
fill(255, 0, 0);
ellipse(x, x, 200, 200);

if (x > width) {
speed = speed * -1;
}

else if (x < 0) {
speed = speed * -1;
}

x = x+speed;
}

void mousePressed(){
fill(0,225,0);
ellipse(x, x, 200, 200);
}

Posted in Uncategorized | Leave a comment

part 3 hw 3.2

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

Posted in Uncategorized | Leave a comment

Matthew Soto 2/19/13 HW 3.3

int x= 1;
int speed= 1;
float r= 255;
float g= 0;
float b=4;

void setup(){
size(800, 800);
}

void draw(){
background(0);
fill(255);
ellipse(x, 200, 100, 100);

if(x>width){
speed=speed* -1;
fill(255, 0, 4);
ellipse(x, 200, 100, 100);
}
else if (x<0){
speed=speed* -1;
fill(13, 34, 255);
ellipse(x, 200, 100, 100);
}

x=x+speed;
}
void mouseDragged(){//when you drag it gives you the different shades of night.
background(255, 0, 4);//sky, light blue
background (mouseX,mouseY);
}

Posted in Uncategorized | Leave a comment

Homework 3.2

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

Posted in Uncategorized | Leave a comment

H.W. 3.2 part 2 by Reno Abraham

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

Posted in Uncategorized | Leave a comment

Homework 3.2 Part 3

Link here:

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

Posted in Uncategorized | Leave a comment

HW 3.2.3

/*Nafis S Sabir
Prof. Calli Higgins
HW 3.2.3*/

int x = 300;//ellipse x location
float y = random(600);//random ellipse y location
int speed = 2;//x-axis speed change
int bounce = 2;//y-axis speed change
float color1 = random(50);//random float color

void setup() {
size(600, 600);//screen size
}

void draw() {
background(0);//background color
fill(255);//starting fill for bounce ball
ellipse(x, y, 100, 100);//ball size

if (x > width) {
speed = speed * -1;//if the ball exceeds the right boundary it changes direction
}
else if (x height) {
bounce = bounce * -1;//if the ball exceeds the top boundary it changes direction
}
else if (y < 0) {
bounce = bounce * -1;//if the ball exceeds the bottom boundary it changes direction
}
else if (keyPressed) {
fill(mouseX, mouseY, color1);//if keyPressed random color change depending on mouse location
ellipse(x, y, 300, 300);//if keyPressed ball grows
}

x = x + speed;//moves the ball left and right
y = y + bounce;//moves the ball up and down
}

Posted in Uncategorized | Leave a comment

Erick Asadobay H.W 3.2 Part

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

Posted in Uncategorized | Leave a comment

week 3 homework part 3

int x=100;
int speed=10;
float r, g, b;
void setup() {
size(600, 600);
background(0);
}
void draw(){

r=random(255);
g=random(100);
b=random(200);

fill(255);
rect(0,50,600,100);

fill(0);

 

ellipse(x, 100, 50, 50);
if(x>width) {
speed=speed*-1;
}
else if (x < 0)
speed=speed*-1;

x = x- speed;
}
void mousePressed(){
fill(r,g,b);
rect(300,100,100,600);
rect(0,100,100,600);
rect(150,100,100,600);
rect(450,100,100,600);
}

Posted in Uncategorized | Leave a comment