Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions BasicImages/BasicImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,37 @@
PImage pooh; //declare variables
float scaleFactor=.5;
PVector loc = new PVector();
PVector vel = new PVector();


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

pooh = loadImage("download.jpg"); //load the image
imageMode(CORNERS);
noCursor();
loc = new PVector(width/2,height/2); //set values for vel and loc
vel = new PVector(1,1);


}



void draw(){
background(0);
tint(255,100);

image(pooh,loc.x,loc.y, pooh.width*scaleFactor ,pooh.height *scaleFactor); //draw the image
loc.add(vel); //move the image
if (loc.x >= width) { ///set parameters for moving the image
loc.x = 0;
} else if (loc.x <= 0) {
loc.x = width;
}
if (loc.y >= height) {
loc.y =0;
} else if (loc.y <= 0) {
loc.y = height ;
}
}
Binary file added BasicImages/data/download (1).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/download.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added BasicImages/data/pooh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions FilteringImages/FilteringImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,41 @@
PImage pooh; //declare variables
float scaleFactor=.5;
PVector loc = new PVector();
PVector vel = new PVector();


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

pooh = loadImage("download.jpg"); //load the image
imageMode(CORNERS);
noCursor();
loc = new PVector(width/2,height/2); //set values for vel and loc
vel = new PVector(1,1);


}



void draw(){
background(255);


tint(255,100);

image(pooh,250,250); //draw the image

filter(BLUR,5);
filter(POSTERIZE,5);

fill(0);
;
textSize(40);


text("Winnie the Pooh",150,200);



}
Binary file added FilteringImages/download (1).jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added FilteringImages/download.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 110 additions & 0 deletions IndependentImagePractice/IndependentImagePractice.pde
Original file line number Diff line number Diff line change
@@ -1 +1,111 @@
PImage farm; //initialize variables
PImage rain;
PImage sun;
PImage snow;
PImage tornado;
float sf = .55;
PVector loc = new PVector(); //initialize vectors
PVector vel = new PVector();




void setup() {
size(500, 500); //set size of canvas
farm = loadImage("farm.jpg"); //load and declare images from data folder to the name on the drawing
rain = loadImage("rain.png");
sun = loadImage("sun.png");
snow = loadImage("snow.gif");
tornado = loadImage("tornado.png");

imageMode(CENTER); //change the image mode to center

loc = new PVector(width/2, height/2); //declare values for vel and loc //set values for the vectors
vel = new PVector(0, 1);
}






void draw () {

tint(255, 100); //change the tint of the drawing
background(0); //set the background to black
image(farm, width/2, height/2, rain.width*sf, rain.height*sf); //draw the farm image
if(frameCount < 40){ //use an if statement for if the framcount is less than 40
image(sun,400,75,100,100); //draw the sun
}


if(frameCount > 40 && frameCount < 100){ //use if statment for if the frame count is between 40 and 100
noTint(); //change the tint back
image(rain, loc.x, loc.y); //draw the image rain

loc.add(vel); //give the rain picture movement
if (loc.x >= width) { ///set parameters for moving the image
loc.x = 0;
} else if (loc.x <= 0) {
loc.x = width;
}
if (loc.y >= height) {
loc.y =0;
} else if (loc.y <= 0) {
loc.y = height ;
}

}

if(frameCount > 60){ //use an if statement for if the frame count is greater than 60
filter(GRAY); //turn the filter gray
}

if(frameCount > 100 && frameCount < 150){ //use an if statement for if the frame count is greater than 100 but less than 150


image(snow,loc.x,loc.y,500,500); //draw the snow image
filter(GRAY); //add the filter to the image
loc.add(vel); //give the picture movement
if (loc.x >= width) { ///set parameters for moving the image
loc.x = 0;
} else if (loc.x <= 0) {
loc.x = width;
}
if (loc.y-250 >= height) {
loc.y =0;
} else if (loc.y <= 0) {
loc.y = height ;
}

if(frameCount > 120){ /////use an if statement for if the frame count is greater than 120
filter(BLUR,2); //add a blur filter


}


}

if(frameCount >150){ //use an if statement for if the frame count is greater than 150
image(tornado,loc.x,loc.y,250,300); //draw the tornado image
vel = new PVector(random(10,10), random(10,10)); ////declare a new value for the vector velocity
loc.add(vel); //give the image movement

if (loc.x >= width) { ///set parameters for moving the image
loc.x = 0;
} else if (loc.x <= 0) {
loc.x = width;
}
if (loc.y-250 >= height) {
loc.y =0;
} else if (loc.y <= 0) {
loc.y = height ;
}




}

}
Binary file added IndependentImagePractice/data/clouds.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/farm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/rain.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/rain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/snow.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/sun.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added IndependentImagePractice/data/tornado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions MaskingImages/MaskingImages.pde
Original file line number Diff line number Diff line change
@@ -1 +1,27 @@
PImage pooh; //declare variables
float scaleFactor=.5;
PVector loc = new PVector();
PVector vel = new PVector();
PImage mask;

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

pooh = loadImage("pooh.gif"); //load the image
imageMode(CORNERS);
noCursor();
loc = new PVector(250, 250); //set values for vel and loc
vel = new PVector(1, 1);
mask = loadImage("mask.jpg");

pooh.mask(mask);
}



void draw() {
background(0);


image(pooh, loc.x, loc.y);
}
Binary file added MaskingImages/farm.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/mask.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/pooh.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MaskingImages/pooh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.