diff --git a/BasicImages/BasicImages.pde b/BasicImages/BasicImages.pde index 8b13789..4adc4c2 100644 --- a/BasicImages/BasicImages.pde +++ b/BasicImages/BasicImages.pde @@ -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 ; + } + } \ No newline at end of file diff --git a/BasicImages/data/download (1).jpg b/BasicImages/data/download (1).jpg new file mode 100644 index 0000000..db26ee4 Binary files /dev/null and b/BasicImages/data/download (1).jpg differ diff --git a/BasicImages/data/download.jpg b/BasicImages/data/download.jpg new file mode 100644 index 0000000..fb90f08 Binary files /dev/null and b/BasicImages/data/download.jpg differ diff --git a/BasicImages/data/mask.jpg b/BasicImages/data/mask.jpg new file mode 100644 index 0000000..d0f8372 Binary files /dev/null and b/BasicImages/data/mask.jpg differ diff --git a/BasicImages/data/pooh.jpg b/BasicImages/data/pooh.jpg new file mode 100644 index 0000000..8f14ae5 Binary files /dev/null and b/BasicImages/data/pooh.jpg differ diff --git a/FilteringImages/FilteringImages.pde b/FilteringImages/FilteringImages.pde index 8b13789..c02c169 100644 --- a/FilteringImages/FilteringImages.pde +++ b/FilteringImages/FilteringImages.pde @@ -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); + + + +} \ No newline at end of file diff --git a/FilteringImages/download (1).jpg b/FilteringImages/download (1).jpg new file mode 100644 index 0000000..db26ee4 Binary files /dev/null and b/FilteringImages/download (1).jpg differ diff --git a/FilteringImages/download.jpg b/FilteringImages/download.jpg new file mode 100644 index 0000000..fb90f08 Binary files /dev/null and b/FilteringImages/download.jpg differ diff --git a/IndependentImagePractice/IndependentImagePractice.pde b/IndependentImagePractice/IndependentImagePractice.pde index 8b13789..acd5dea 100644 --- a/IndependentImagePractice/IndependentImagePractice.pde +++ b/IndependentImagePractice/IndependentImagePractice.pde @@ -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 ; + } + + + + +} + +} \ No newline at end of file diff --git a/IndependentImagePractice/data/clouds.jpg b/IndependentImagePractice/data/clouds.jpg new file mode 100644 index 0000000..f409a89 Binary files /dev/null and b/IndependentImagePractice/data/clouds.jpg differ diff --git a/IndependentImagePractice/data/farm.jpg b/IndependentImagePractice/data/farm.jpg new file mode 100644 index 0000000..ec4d938 Binary files /dev/null and b/IndependentImagePractice/data/farm.jpg differ diff --git a/IndependentImagePractice/data/rain.jpg b/IndependentImagePractice/data/rain.jpg new file mode 100644 index 0000000..7f5ad9a Binary files /dev/null and b/IndependentImagePractice/data/rain.jpg differ diff --git a/IndependentImagePractice/data/rain.png b/IndependentImagePractice/data/rain.png new file mode 100644 index 0000000..f97b693 Binary files /dev/null and b/IndependentImagePractice/data/rain.png differ diff --git a/IndependentImagePractice/data/snow.gif b/IndependentImagePractice/data/snow.gif new file mode 100644 index 0000000..e2d0503 Binary files /dev/null and b/IndependentImagePractice/data/snow.gif differ diff --git a/IndependentImagePractice/data/sun.png b/IndependentImagePractice/data/sun.png new file mode 100644 index 0000000..e8e42ab Binary files /dev/null and b/IndependentImagePractice/data/sun.png differ diff --git a/IndependentImagePractice/data/tornado.png b/IndependentImagePractice/data/tornado.png new file mode 100644 index 0000000..34163bb Binary files /dev/null and b/IndependentImagePractice/data/tornado.png differ diff --git a/MaskingImages/MaskingImages.pde b/MaskingImages/MaskingImages.pde index 8b13789..e0ba4a3 100644 --- a/MaskingImages/MaskingImages.pde +++ b/MaskingImages/MaskingImages.pde @@ -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); +} \ No newline at end of file diff --git a/MaskingImages/farm.jpg b/MaskingImages/farm.jpg new file mode 100644 index 0000000..ec4d938 Binary files /dev/null and b/MaskingImages/farm.jpg differ diff --git a/MaskingImages/mask.jpg b/MaskingImages/mask.jpg new file mode 100644 index 0000000..dafb975 Binary files /dev/null and b/MaskingImages/mask.jpg differ diff --git a/MaskingImages/pooh.gif b/MaskingImages/pooh.gif new file mode 100644 index 0000000..5baeb66 Binary files /dev/null and b/MaskingImages/pooh.gif differ diff --git a/MaskingImages/pooh.jpg b/MaskingImages/pooh.jpg new file mode 100644 index 0000000..8f14ae5 Binary files /dev/null and b/MaskingImages/pooh.jpg differ